The seasons on the Earth arise from the fact that the Earth's spin axis is tilted 23.5° with respect to the plane of its orbit around the Sun (the ecliptic plane). The seasons indicated in the diagram below are from the perspective of the northern hemisphere. This spin axis direction is fixed in space by conservation of angular momentum with the exception of a tiny amount of precession which for this discussion has a negligible effect. Like a huge gyroscope, its axis holds its direction in space so that at the summer solstice the northern hemisphere is tilted toward the Sun and six months later is tilted away from the Sun at the winter solstice.
A common misconception is that the seasons have something to do with the Earth being further from the Sun during the winter. The Earth's orbit around the Sun is very nearly circular, with only a 1.67% variation in the distance from the Sun during the year. And the time that it is slightly closer is not during the summer, but during January! This prevalent misconception about the seasons may come partly from the nature of perspective drawings like the one above which looks like an ellipse, bringing the Earth closer to the Sun at some points. But the intent of the drawing is to depict a circular orbit.
Solar System Illustration
Solar System Concepts
Chaisson & McMillan