The Earth takes (365 and 1/4) days to orbit the sun. That's the length of our 'year'.
Since it's not really possible to make our calendar a quarter of a day longer every year, we make the calendar a whole day longer every 4 years.
So "Leap years" make up for the extra one-fourth day the Earth takes to orbit the sun.