Copied from my answer to the question What is the intuition behind the mathematical definition of convexity?; that is essentially a duplicate, so I have just flagged it as such.
The idea of convexity is is applicable in the first place to shapes or their surfaces and means bulging with no dents. This concept can be applied when the shape is a set of points in a space for which we can define a “dent”; Euclidean spaces will do. It can also apply to part of the surface with no dents.
We can think of a dent as a place where you can draw a straight line segment joining two points in the set but leaving the set somewhere along that segment. If the set is “well-behaved” and has a surface, such a segment leaves the set at some point and re-enters it another, there is a subsegment joining points on the surface. In this case, we may define convex by saying all points on such segments lie in the set.
Derived from that, a function is described as convex when the set of points above (or maybe below) of its graph is convex. Note that a function may be convex upwards or downwards, with the unqualified form meaning “convex downwards”. Further, as in your case, we call a function convex on an interval if the set of points above the graph with $x$ in that interval is convex.
The formulation with $λ$ and $1-λ$ formalises the above definition for the case of a function, that all points on a segment between points on the graph lie in the set: one side gives the value of the function $λ$ of the way along $[x_1,x_2]$, the other, the point that far along the segment joining two points on the line; the inequality says the point on the segment is above the graph, i.e. in the set.