To answer this question, we need to remember two things about the Earth: it spins as it orbits the Sun; and it takes one day for the Earth to do one complete spin. This short animation shows how the Earth spins as it orbits the Sun.
One full Earth day lasts 24 hours during which we have some light hours (daytime) and some dark hours (nighttime). Daytime is when the part of the Earth that we live on faces towards the Sun and nighttime is when that part of the Earth faces away from the Sun.
At nighttime, the part of the Earth where you live faces away from the Sun, so you can’t see any sunlight. But as the Earth spins round, the part where you are turns towards the Sun. The sky gets lighter and it looks as if the Sun is coming up over the horizon, rising into the sky. We call this ‘sunrise’.
In the evening, the part of the Earth where you are turns away from the Sun. The sky gets darker and it looks as if the Sun is moving down in the sky towards the horizon. We call this ‘sunset’.
But the Sun doesn’t actually rise or set – the Sun stays where it is in the middle of our solar system. It just looks to us like it is moving up and down in the sky because the Earth spins as it orbits the Sun.