Day and night happen because Earth is always spinning! As it spins, one half of the Earth faces the sun and has day, while the other half faces away and has night.
Because Earth is so big, it takes 24 hours for it to spin once. This means we have a full day and night cycle every single day!