You can learn how day and night happens by rotating the Earth on its own axis while it also revolves around the sun.
Earth’s rotation is the rotation of Planet Earth around its own axis. Earth rotates eastward, in prograde motion. As viewed from the north pole star Polaris, Earth turns counterclockwise.
The North Pole, also known as the Geographic North Pole or Terrestrial North Pole, is the point in the Northern Hemisphere where Earth’s axis of rotation meets its surface. This point is distinct from Earth’s North Magnetic Pole. The South Pole is the other point where Earth’s axis of rotation intersects its surface, in Antarctica.
Earth rotates once in about 24 hours with respect to the Sun, but once every 23 hours, 56 minutes, and 4 seconds with respect to other, distant, stars. Earth’s rotation is slowing slightly with time; thus, a day was shorter in the past. This is due to the tidal effects the Moon has on Earth’s rotation.