The short answer is that if leap days were not added to the calendar every so often, eventually dates on the calendar would slide around the physical year, and January 1 would come in the summer.
It is theoretically possible to adjust for the odd length of the year by shifting clock times by 5 hours, 48 minutes, and 48 seconds every year, but to do so would obviously be ridiculously complicated and inconvenient.
The solution has been to add leap days: whole days, not portions thereof. Since the year is not quite six hours longer, one leap day every four years doesn’t quite fix the problem, and various exceptions have to be made.
As for the details:
A day is the amount of time it takes the earth to rotate on its axis once, and is by definition, exactly* 24 hours. (GorillaMan’s period of 23 hours, 56 minutes, 4 seconds is a sidereal day, with which we need not be concerned at this moment.)
A year is defined as the time it takes the earth to revolve around the sun once. Its period is not, as the OP pointed out, an even multiple of the length of the day, and there is no particular reason why it should be. Indeed, it would be a nearly unbelievable coincidence if it were.
What does this mean? At exactly midnight tonight, reach out a couple hundred miles above the earth and make a mark in space. Now next August 22, keep your eyes open for that mark and you’ll notice that it shows up at about 5:48 am instead of midinght. So in 2008 it will show up almost a whole day late.
So some adjustments become necessary to the calendar. Leap days.
(I see on preview that scr4 has beaten me to part of my explanation. Well done, scr4.)
- Okay, the second is defined independently of the day, and leap seconds are added rather than adjusting the length of a second to the changing rate of the earth’s rotation, but we don’t need to be concerned about this now, either.