Rotation and Revolution at the Same Time
To recap, the Earth rotates once upon its axis each day, and revolves once around the Sun each year. These two motions happen at the same time - that is, while the Earth is rotating, it's also revolving, so that by the time it completes one full rotation, it's no longer in the same place along its orbit. This is the key to the difference between a solar day and a sidereal day.
A solar day is the length of time that it takes for the Sun to be in the same spot in the sky (as seen by an observer on Earth) a second time - for example from noon to noon. On Earth, a solar day is 24 hours long.
A sidereal day is the length of time that it takes for the Earth to make one full 360-degree rotation around its axis. By the time it's done, it has moved a short distance on its orbital path - and the Sun isn't in the same place. A sidereal day is about 4 minutes shorter than a solar day. It takes the first 4 minutes of the next rotation for the Sun to be back to the same spot in the sky relative to the stars.
In the diagram to the left, #2 marks a full sidereal day, and #3 marks a full solar day.