A year is the time that it takes the Earth to complete one revolution around the Sun.
You might think that a day is the time that it takes the Earth to complete one rotation of 360 degrees, but that isn’t true. A full 360 degrees rotation takes only about 23 h 56 m. It then takes 4 more minutes before the Sun is in the same direction as the previous day, because of the progression of the Earth in its orbit around the Sun.
There are about 365.2422 of these 24 h days in a year. This means that 365 days is not enough to complete a revolution around the Sun; it is about 6 h (0.25 days) too short. Of course, making a year 366 days also doesn’t work, since that would be 0.75 days too long. However, a combined period of 4 years is about one whole day too short, immediately suggesting the idea of adding an extra day every 4 years. This gives rise to the basic rule for leap years:
A year that is exactly divisible by 4 is a leap year. For example, 2016, 2020, 2024, etc.
This would be the perfect solution if a year would be 365.25 days. However, it is (about) 365.2422 days… With a leap year every 4 years, there are 36525 days (100×35 plus 25 leap days) in a century. On the other hand, 100 revolutions around the Sun take (about) 36524.22 days. So, a century is about 0.78 days too long. This is the reason for the exception on the “every 4 years” that follows.
A year that is exactly divisible by 4 but also by 100 is not a leap year. For example, 2100, 2200, 2300, etc.
But 2000 was a leap year, I hear you think. Indeed, with the exception, 400 years contain 146096 days (4×36525 minus 4 non-leap days), but 400 revolutions around the sun take (about) 146096.88 days. And this is the reason for the exception on the exception:
A year that is exactly divisible by 4 and 100 but also by 400 is a leap year. For example, 2000, 2400, 2800, etc.
This makes the length of the average year equal to 365.2425 days. This is not exactly the same as 365.2422, but any stress about that will only materialize many centuries from now…
The current year 2020 is unexceptional, in that it is a leap year because 2020 is exactly divisible by 4.