A day is the time it takes the Earth to spin around once. It is day time on the side of the Earth that is facing the Sun. When it is night time, that side of the Earth is facing away from the Sun. It takes 24 hours for the Earth to spin once, so that is one day, including the day time and night time. This is mean solar time, measured relative to the Sun. There is also sidereal time, measured relative to the fixed stars. The sidereal day is a few minutes shorter.