A common misconception is that summer happens when Earth is closer to the sun. It isn't: Earth is actually slightly closer to the sun in early January, during the Northern Hemisphere's winter. Seasons come from Earth's axis being tilted about 23.5 degrees relative to its orbit. That tilt stays pointed the same direction in space year-round, so as Earth orbits, each hemisphere leans toward the sun for part of the year and away for the other part.
When your hemisphere tilts toward the sun, sunlight strikes more directly (concentrating energy on less ground) and days are longer — that's summer. When it tilts away, light hits at a shallow angle spread over more area, and days are shorter — winter. Because the hemispheres tilt oppositely, they always have opposite seasons: it's summer in Australia during a European Christmas.