is a sphere which orbits . This means that half of it faces towards the sun while the other half faces away.
The half that is facing towards the sun is experiencing daytime. The half facing away from the sun is experiencing night-time.
Since the Earth rotates, any part facing the sun will also rotate. It will rotate until it is no longer facing the sun, causing the sun to ‘set’ and for night-time to begin.
Image source: http://www.bobthealien.co.uk/moonphase.htm