The planet Earth both rotates on its own axis, and circles the sun.
The rotation on the axis causes the sun to “set” on a horizon, while it “rises” on the other side.
The Earth will generally be lit up on half the planet at any given time.
A quick way to experience this, grab a large ball and a flash light. Point the light at the ball and slowly rotate the ball. The light will always be on the ball, but only on the side that is visible to the sun, that would be “Day Time”. The side away from the sun is “Night Time”.
Latest Answers