The convex shape of an indifference curve is due to the idea of diminishing marginal utility. This idea states that you get less value from consuming the "next one" of a good or service than you got from consuming the previous one. (Please note that this is an assumption that cannot be truly proven.)
If you got the same marginal utility from consuming the next unit of some good or service, the indifference curve would be straight (though still downward sloping). However, because of diminishing marginal utility, the curve has to be convex to the origin.
Indifference curves are convex to the origin because the marginal utility of each product consumed decreases with subsequent consumption. This convex relationship is based upon an idea dubbed the marginal rate of substitution, which is represented by the formula (Z = change in X / change in Y). The reason that the marginal rate of substitution decreases is due to the principle of diminishing marginal utility. Put simply, diminishing marginal utility refers to the aforementioned idea that each additional unit consumed will result in less additional satisfaction in comparison to the original unit consumed. For this reason, products that are higher on the indifference curve are going to be more preferred by consumers in comparison to products that fall lower on the indifference curve. As a necessity, indifference curves include more than one product.
An indifference curve shows the combinations of goods to which a consumer is indifferent, meaning that the consumer gets the same degree of satisfaction from either good. Indifference curves slope down from left to right because as a consumer increases his or her consumption of one good, he or she consumes less of the other good to keep his or her satisfaction constant.
Indifference curves are convex to the origin because as the consumer begins to increase his or her use of one good over another, the curve represents the marginal rate of substitution. The marginal rate of substitution is the rate at which a consumer gives up one good for another. The marginal rate of substitution goes down as the consumer gives up one good for another, so it is convex to the origin. The curve could not be concave, as this would mean that the marginal rate of substitution increases (which is not possible as the consumer gives up one good for another).
As stated in answer posted above, the convex shape of indifference curves can be explained in terms of the law of diminishing marginal utility. In my response here I will amplify on this by giving an example. But before we come to the examples I, let us make sure that we are clear about what we mean by indifference curve and law of diminishing marginal utility.
Samuelson and Nordhaus define indifference curve as:
A curve drawn on a graph whose two axes measure amounts of different goods consumed. Each point on such a curve, indicating different combinations of the two goods, yields exactly the same level of satisfaction to a given consumer.
And they define law of diminishing marginal utility as:
The law which says that as more and more any one commodity is consumed , its marginal utility declines.
Now to explain the shape of indifference curve, assume a person with a basket of 100 apples. If he is given the choice to exchange some of his apples with oranges, he might be ready to give up 5 apples in exchange for just one orange as the marginal utility of apples at this stage is very low as the total quantity is high. In comparison, the marginal utility of orange is very high as he has no oranges at all. But to get one more orange he may be prepared to part with only 4 additional apples as the marginal utility of oranges has declined while that of apples has increased. Thus as number of total apples decreases and that of orange increases number of apples given up for number of oranges may be as follows
Number of apples exchanged --> 5 4 3 2 1 1 1 1 1
Number of oranges exchanged --> 1 1 1 1 1 2 3 4 5
Total Apples --> 95 91 88 86 85 84 83 82 81
Total Oranges --> 1 2 3 4 5 7 10 14 19
If you draw a graph of apples versus oranges using the above data you will see that it is a curve convex to the origin.
Samuelson P.A. and Nordhaus W.D., Economics, Eighteenth Edition, 2005, Tata McGraw-Hill, New Delhi