Where did the Sun come from?

Earth would be a frozen lump of rock without the energy created from our nearest star.