How long does it taks earth to rotate?

One Day, or 24 hours. Twenty four hours is the rough and commonly understood period of rotation, since we know that a day of universal time is exactly 24 hours in length. But to be more precise, a sidereal rotation of the earth (exactly 360 degrees as observed from the distant stars) takes 23 hours, 56 minutes and about 4.1 seconds. To understand how this can be so, research the difference between sidereal and synodic periods of rotation.