According to the National Weather Service, seasons are cause by the Earth's axial tilt, which is 23.5 degrees off the vertical. During various points in its orbit, the planet's north pole points toward or away from the sun to an extent. When it points toward the sun, the northern hemisphere receives more direct sunlight, and when it points away, the hemisphere receives less energy from the sun, causing the seasons.
The NASA Space Place explains that, in the northern hemisphere, summer occurs during the portion of the Earth's orbit when the northern hemisphere is pointed toward the sun. This not only increases the amount of warmth that the hemisphere receives, but lengthens the amount of time the sun is in the sky. On the other side of the orbit, the opposite effect occurs, cooling the hemisphere and shortening the days. The other six months of the year, the hemisphere is neither pointed toward or away from the sun.
Since one hemisphere is pointed away from the sun while the other is pointed towards it, that means that when it is summer in the north, it is winter in the south. For this reason, while America swelters through a steaming summer, countries like South Africa experience the depths of winter in July.