Now, what does it mean to be convex or strictly convex? The difference is subtle but important. In order for a line to be convex (or express convexity) there has to be a slope to the line. For those that have taken calculus, a strictly convex line has to have a second derivative that is greater than zero. Graphically, this means that a straight line cannot be strictly convex, but is possible to still be convex.
Why do well-behaved preferences have a convex shape? It's because people prefer well-balanced distributions of goods and services opposed to extremes. For this to occur, the marginal rate of substitution (MRS) needs to change depending on where we are on the indifference curve. Remember that the MRS is the slope of the indifference curve, and if we have a straight line, it won't change.
The slope of lines B and C imply that there is a constant trade off or MRS between goods X and Y no matter the amount of X and Y we consume. However, for the strictly convex curve A, we see that a lower total amount of goods are needed if both goods X and Y are consumed (as opposed to a very high number of X and a low number of Y).
Strict convexity isn't needed to have an indifference curve, but without it, we are assuming that the two goods are perfect substitutes, which isn't likely.
Additionally, tangency can only be achieved when preferences are well-behaved/strictly convex. This is because of the linear nature of a budget constraint. It is only possible for a linear indifference curve to touch a linear budget constraint at one point, and usually this results in only one of the goods being consumed.
A good example of a tangent point is point D above, at the point curves A and C have the same slope (marginal rate of substitution = marginal rate of transformation). At point E, the curves cross, but they do not share the same slope and therefor it is not tangent or optimal. The person could be better off consumer higher quantities of X (and lower quantities of Y) improving their overall utility while staying within their budget constraint.
Since tangency only occurs when an indifference curve is strictly convex, it is a sufficient condition for convex preferences and an interior optimum.
TLDR: Well-behaved preferences (avoiding extremes) is exhibited by convexity.
Indifference curves can be either convex or strictly convex, but interior solutions generally only happen when they are strictly convex.
Presence of a tangent point (between a budget constraint and indifference curve) is a sufficient condition for strict convexity of indifference curves.