Looking into space
The earth rotates once on its axis once in just under 24 hours but we cant feel the earth spinning. This takes 23 hours 56 minutes.
The sun planets and moon appear to move east to west across the sky and their time is relevant to their orbits. The sun appears to cross the sky once every 24hours.
The Earth and the sun
Sidereal day: time taken for earth to rotate 360 degrees on its axis
Solar day: time from noon one day to noon the next day
As the earth rotates on its axis it also orbits the sun and is the reason why a sidereal day is 4 minutes shorter then a solar day.