How Long Does It Take the Earth to Rotate on Its Axis?
A complete rotation of the earth on its axis takes approximately 23 hours, 56 minutes and four seconds with respect to the background stars. However, the sun returns to the same place in the sky (correcting for seasonal differences) every 24 hours. The reason for this difference is that the journey of the sun back to the same spot is a solar day, while the period of rotation is known as the sidereal day.
The reason for the difference between solar and sidereal days is that the earth is orbiting the sun in a period of time that takes 365 1/4 days. Dividing 24 hours by 365 days, you have about 4 minutes left over. This means that the sun’s position goes ahead about 4 minutes each day, which is the difference between the two types of days.