It takes 365 and just less than a quarter days for the earth to move back to the same position relatively to the sun. Because of the quarter day, every four years we have a leap day to make sure that the seasons stay in the same place in relation to the year.
This is because the rotation on its own axis is not relational to its rotation around the sun. So it actually turns on its own axis 365.2422 each year.
If the year can be divided by 100 then we do not have a leap day, but if it can be divided by 400 we do have one.
Apparently, we have leap seconds on December 31st. This means we get an extra beep on Radio 4 at midnight.
Hope that clears that up then.