The Earth goes through a constant cycle of day and night because it rotates on an axis. At any point in time, only about half of the Earth is facing the sun, while the other side is facing away from it. The side that is facing the sun is illuminated (day) while the side facing away from the sun remains dark (night).
The Earth takes about 24 hours to rotate once. For an observer living on the equator, the day and night are both approximately 12 hours long. This is the constant condition near the equator, where the sun’s rays are roughly perpendicular to the Earth’s surface all year. However, because the Earth’s axis is approximately 23.5 degrees different from the sun’s axis, the Earth is tilted. This means that the length of day and night changes for observers living far from the equator.
In January, when the Earth is at its closest approach to the sun, called its perihelion, the Northern Hemisphere is tilted away from the sun, according to About.com. This tilt causes the days to become shorter and the nights to become longer. Conversely, during the same period, the Southern Hemisphere is tilted toward the sun, providing it with longer days and shorter nights. At the opposite end of the Earth’s orbit, called the aphelion, the Northern Hemisphere is tilted toward the sun, while the Southern Hemisphere is tilted away from it, reversing the pattern.
All planets rotate around their axis as they orbit their star. Some planets rotate quickly, such as Jupiter, which rotates completely in a little less than 10 hours. At the other end of the spectrum, Venus takes more than 225 Earth days to make one complete rotation.