The process that causes stars to shine is the same one that we have harnessed for use as a weapon: nuclear fusion.
Stars start as huge regions of gas, mostly hydrogen. This gas will start to contract, and it heats up. As it contracts, its temperature rises. When the heat gets high enough, it causes the individual hydrogen atoms to collide and combine into helium with the release of energy.
Itís called fusion, because it fuses smaller nuclei into bigger ones. It releases enormous energy. The stellar gas, now in a spherical shape, is contracted further by gravity while exploding by fusion. Together, a balance is reached and a star is born. The energy released in the starís center makes its way to the surface, where it is radiated into space as light, heat x-rays, ultraviolet light and radio waves.
Eventually, a star will use up all of its available small atoms, and the fusion energy is no longer available. In some stars, the further collapse triggers fusion of helium into carbon, or carbon into even heavier elements. Finally, all the elements that can provide energy are exhausted, and the star starts its final collapse.