It really depends on the function. Some functions admit compact general expressions for arbitrary order derivatives:
$$\begin{align*}
\frac{\mathrm d^k}{\mathrm dx^k}x^n&=k!\binom{n}{k}x^{n-k}\\
\frac{\mathrm d^k}{\mathrm dx^k}\sin\,x&=\sin\left(x+\frac{k\pi}{2}\right)\\
\frac{\mathrm d^k}{\mathrm dx^k}\cos\,x&=\cos\left(x+\frac{k\pi}{2}\right)\\
\end{align*}$$
and as already mentioned, if your function satisfies a nice differential equation, you can use that differential equation to derive a general expression for your derivatives.
(As a bonus, the formula for the derivative of the power function can be generalized to complex $k$, barring exceptional values of $n$ and $k$; this is the realm of the fractional calculus. The formulae for sine and cosine are no longer as simple in the general complex case, though.)
In general, however, there isn't always a nice expression. This page for instance displays a number of representations for the derivative of the tangent function. None of them look particularly nice. Sometimes, functions won't even allow for an explicit expression for derivatives, as in the case of the Lambert function. (Note that the last formula in that page requires an auxiliary recursive definition for the polynomials that turn up in the differentiation.)
Relatedly: formulae like the Leibniz rule and the Faà di Bruno formula are helpful when determining general expressions for derivatives of more complicated functions. There are also a number of formulae listed here.