When the north pole points toward the sun, the sun's rays hit the northern half of the world more directly and it is summer. But when the north pole is pointed toward the sun, the south pole is pointed away. So the sun's light hits the earth at a less direct angle, spreading the warmth over a larger area, and it is winter. When the sun is overhead, the energy reaching a given area is a maximum. When it is low in the sky, this same amount of energy is spread out over a larger area.
Many people mistakenly think the seasons are caused by how far the earth is from the sun.
Not only that, but we are actually closest to the sun on about January 2nd, and the farthest on about July 4th, the opposite of hot and cold weather in the northern hemisphere. The angle at which sunlight hits the Earth is a much larger factor. Another significant factor, though, is that summer is even warmer and winter is colder because of the length of our days and nights. In the summer daylight lasts longer and nighttime is shorter. In winter the days are shorter and the nights longer.