Answer: Stars are formed in clouds of gas and dust, known as nebulae. Nuclear reactions at the centre (or core) of stars provides enough energy to make them shine brightly for many years. The exact lifetime of a star depends very much on its size.
Explanation: I try to do your question, hope this help