What Causes Day and Night to Happen?

Day and night happens because the rotation of the earth on its axis. When the earth rotates towards the sun, it is daytime. When it rotates away from the sun, it is night.