Imagine holding a flashlight up to an orange in a dark room. The flashlight is the Sun, and the orange is Earth. Only half the orange is lit; the other half remains in shadow. If you rotate the orange, different parts move into the light. That is exactly how Earth works.
At any given moment, only half of Earth faces the Sun. This sunlit half experiences day . The other half faces away from the Sun, receiving no direct sunlight, and experiences night . The fuzzy, moving boundary between the day side and the night side is called the terminator —the line where sunset or sunrise is happening.
The Rotating Earth: Why We Have Days and Nights