The Sun and its Output

What is the Sun and how does it affect the Earth?