Rotation:
* Earth spins on its axis completing one rotation roughly every 24 hours. This rotation is what causes day and night.
* As the Earth rotates, different parts of the planet face the Sun. When your location on Earth faces the Sun, it's daytime. When it faces away from the Sun, it's nighttime.
* The direction of rotation (counter-clockwise when viewed from above the North Pole) determines which side of the planet faces the Sun first. This is why the Sun rises in the east and sets in the west.
Revolution:
* Earth orbits the Sun in a slightly elliptical path, completing one full revolution approximately every 365.25 days.
* This orbit is what creates the year. However, it also plays a role in the length of day and night throughout the year.
* Due to Earth's tilted axis (23.5 degrees), the amount of sunlight received by different parts of the planet varies throughout the year. This is why we have seasons.
* During summer in a particular hemisphere, that hemisphere is tilted towards the Sun and experiences longer days. During winter, that hemisphere is tilted away from the Sun and experiences shorter days.
Combined Effects:
* Sunrise: As Earth rotates, the spot where you are located on the Earth gradually faces the Sun. When the Sun peeks above the horizon, you experience sunrise.
* Sunset: As the Earth continues to rotate, your location moves away from facing the Sun. When the Sun dips below the horizon, you experience sunset.
In Summary: Earth's rotation is the primary driver of sunrise and sunset, while its revolution around the Sun causes the variation in day length throughout the year.