The seasons are a result of Earth’s tilt on its axis and the Earth’s revolution around the sun. When the Northern hemisphere points toward the sun, then it is summer in the Northern Hemisphere. Since the Earth is tilting towards the Sun at this time, light rays from the Sun hit the Earth more directly. Thus, the Northern Hemisphere has longer days during its summer season. When the Northern Hemisphere leans towards the Sun, the Southern Hemisphere is pointing away from the Sun. Therefore, when it is summer in the Northern Hemisphere, it is winter in the Southern Hemisphere. When a hemisphere points away from the Sun during winter, it experiences indirect sunlight. Thus, the hemisphere experiencing winter has shorter days.
Please note that the opposite is also true. When it is summer in the Southern Hemisphere, it is winter in the Northern Hemisphere. The orientation of Earth during each season can be visualized here.