The Sun is a star. It was born in what is termed a nebula or giant nebula. These are giant clouds made up mainly of hydrogen gas molecules and are usually referred to as GMCs or giant molecular clouds. These clouds are gigantic and range in size from 1,000 to 2,000,000 solar masses. They can have a density of 200 molecules per cubic centimeter.(16)
You usually find a lot of gas and dust within these clouds – mostly hydrogen and helium. It takes several million years while gravity pulls this dust close together. As the material is pulled together, gas gets extremely hot and the pressure increases. When the gas reaches higher temperatures a nuclear reaction starts. The hydrogen atoms smash into each other making helium and the star begins to shine.
The star is now an adult and will continue to burn hydrogen for a long time. Our Sun, for example, is in this phase of life and it will be 5 billion years or so before it uses up all the hydrogen at its core. Stars in this phase are called dwarf (even though they might be 10 times bigger than our Sun) because this is the smallest they will ever be during their life.
As our Sun expands it will finally explode. Later, after it cools it will be termed a white dwarf because its size will be comparatively tiny and it will be white hot.
However, since it will have no source of energy it will soon become cold and remain as a cold dark dense body.