The appearance and disappearance of the sun regulates life on Earth. The average time from one sunrise to the next is one solar day. And the average time it takes the sun to return to the same position relative to you and your horizon does equal exactly 24 hours. It's exact because we've defined a "day" that way and built all our clocks to fit the definition.
Another way to define a day is called a sidereal day. This is the time it takes for Earth to spin once relative to all the stars except the sun. Our local star moves eastward a slight distance relative to the other stars in the galaxy each day.
Earth rotates a little less than one time relative to the sun while it turns exactly once relative to the stars in a sidereal day, which makes a sidereal day shorter than a solar day by four minutes. The sidereal day is 23 hours, 56 minutes, and 4 seconds long.
Do you feel a need for speed? Earth (and that means you) rotates at 1,670 kilometers (1,040 miles) an hour at the equator.