Earth Doesn’t Take 24 Hours to Rotate on its Axis
Astronomers refer to this period of time as a Sidereal Day because it takes the Earth 23 hours, 56 minutes, and 4 seconds to circle once entirely around its axis. What does that mean exactly? Doesn't it imply that a day is 4 minutes shorter than we believe it to be? You could assume that as time passes, day by day, the night will eventually become day, and vice versa.
However, keep in mind that the Earth revolves around the Sun. The Sun travels by around 1° per day, or about the size of the Moon in the sky, in relation to the background stars. Due to the Earth's orbit around the Sun, we can observe a small amount of motion from it. If you add this to the Earth's rotation on its axis, you get a total of 24 hours.
Contrary to a Sidereal Day, the length of time it takes the Sun to return to the same location in the sky is what is known as a Solar Day. Knowing the difference between the two entails understanding how long it takes for the sun to rise and set once, as well as how long it takes for the stars to appear at the same location in the sky.