For the case of at least twice differentiable functions, the answer is given by @OmG - you need to look at the eigenvalues of Hessian.
For the 1-dimensional case the picture is rather intuitive:
If the function grows faster then linear with deviation from the minimum, then the function is convex.
For multidimensional case for any projection on a plane, ...
It is the same as other functions. You can use Theorem 2 in this lecture (from Princeton University):
(ii) condition is about the first-order condition for convexity and (iii) is the second-order. You can also find more detail in chapter 3 of this book ("Convex Optimization" by Stephen Boyd and Lieven Vandenberghe).