For thousands of years people all over the world have been using terms and divisions like “day,“ “night,“ “hour,“ “minute,“ “yesterday,“ and “tomorrow” to talk about lengths of time.
The idea of “a day” – from when the sun rises to when it sets – has always been a pretty basic way of thinking about time. (Especially before there was electricity and “day” and “night” were even more distinguishable!) Within “a day” people usually break down time into units we call hours!
Nobody knows the exact reason why it was decided to measure out an hour so that 24 of them would fit into a day, but we do know the practice goes all the way back to the Ancient Egyptians! One reason they chose to divide a day into a 12-hour day and a 12-hour night is probably because they used to count in a system based on 12.(We now count in a system based on 10.)
It’s also possible they chose 12 because that was the number of moon cycles (months!) in a year. The Egyptians made and used sundials to tell time (there were no clocks yet!) and by looking at the remains of these creations, we can trace what is believed to be the origins of our 24-hour day back to them!