The mean tropical year or solar year is approximately 365 days, 5 hours, 48 minutes, 45 seconds or approximately 365.24219 days.
Our calendar is defined in whole days and if we only had 365 days every year, the calendar would drift causing the seasons to be out of whack.
To offset this drift, every 4 years we add a leap year of 366 days. However, if we were to just add 1 every 4 years that would work if the year were exactly 365 days 6 hours (or 365.25 days). But it isn't. As you can see we are adding too many. So our current Gregorian calendar has us drop a leap year for every 3 of the 4 century dates (e.g. 1700, 1800 and 1900 were NOT leap years, but 2000 was. 2100, 2200 and 2300 will NOT be leap years, but 2400 will be).
With that adjustment, our calendar has 97 leap years every 400 years.
97/400 = 0.2425
--> year = 365.2425 days
With the actual solar year currently being 365.24219 days, we are still off by about 1 extra day every 3236 years. We will probably have to drop a leap year at some time in the future, but it's close enough for now. The Earth's rotation is gradually getting slower and its orbit may also change over time, so it's not worth correcting at this point.