What makes the sun shine? For a lot of folks, this is the kind of thing that doesn't even require explanation: it just does. But just being a commonplace phenomenon in no way explains it. Something must cause the sun to shine. And, in fact, there is an answer. The sun, like every star, was created by the effect of gravity. Originally, all the matter that makes up the sun was in the form of dust and gas floating in space. This dust was composed of different elements, but was mainly hydrogen. Over time, the force of gravity caused that dust to start lumping together: the more it created lumps, the more dust those lumps pulled in. Lumps attached themselves to lumps, until after only a few billion years a titanic mass was formed. This is called a proto-star.
Next, its own gravitational attraction crushes the proto-star tighter and tighter: the larger it is, the more powerfully will it compress its own insides. So tightly is it crushed, in fact, that the hydrogen atoms begin to fuse with each other. Whenever this happens, a blast of energy is released and a new element -- helium -- is produced.
Now the proto-star has become an actual star, crushing hydrogen into helium in an ongoing controlled explosion. The outward force of the explosion keeps the star from contracting too small, while the inward crush of gravity keeps it from blowing apart. Once this equilibrium is reached, a star such as our own sun can stay balanced -- and shining -- for literally billions of years.