At night, the Sun does not go anywhere. Day or night, it stays put at the center of the solar system where it has always been, and will be for the next few billion years. What makes the Sun seemingly disappear at night is the Earth’s rotation or turning motion. While the Sun continuously shines on the Earth, it cannot provide sunlight to all parts of the world at the same time.
Whichever part of the world is facing the Sun, daytime is experienced. For the rest of the world, it is night. As the Earth continues to turn, the “day” side turns away from the Sun giving the impression that the Sun is going down. This is known as sunset. Sunrise is just the exact opposite where the “night” side gets nearer the sun’s direction.
This day and night cycle just goes on and on for as long as the world keeps on turning. The Sun just stays where it is. From time to time, the moon gets in between the Sun and the earth. When this happens, the moon deflects the sunlight which would otherwise be reflected on a particular area of the world. This is known as a solar eclipse and results to a night-like phenomenon on the area deprived of sunlight.
How does the Sun work? The Sun is a young star that actively burns hydrogen in a continuing process and stays as it is because of thermonuclear reactions. The Sun will keep on producing energy for as long as it has hydrogen to burn. And because the Sun is mostly made up of hydrogen gas, it will take billions of years to fully deplete it. Once the Sun stops burning, it will transform into a red giant and its surface will start to expand continuously and will eventually be large enough to engulf the Earth.