The seasons are caused by an alteration of the Earth's tilt with respect to the Sun. In northern hemisphere summer, the tilt of the Earth angles the Arctic towards the Sun while in winter the Antarctic is angled away from the Sun.
These animations depict the Earth's rotation and tilt during both Northern hemisphere winter and Northern hemisphere summer. It is also depicted by the following graph.
Distance from the Sun is a secondary factor in determining seasona shifts in the temperature of midlatitudes. In fact, during boreal summer the Earth is further from the Sun than during winter.