A leap year is a year that holds an additional day i.e. Feb 29. According to the Gregorian Calender, the earth rotates 365 97/400 days i.e. 365.2425.
Hence, rule of thumb is that if the year can be divided by 4, it is a leap year. E.g. the year 2004.
Exception to the rule is that if it’s dividable by 100, and not by 400, it will not be a leap year. E.g. the year 2000 is a leap year, but 2100 is not a leap year. This is to adjust for the extra 0.0025 days we add on every leap year.
However, this is still not accurate as the earth, according to John Herschel, takes 365.24219 days to make a full rotation around the sun. Hence, to drop year 4000 to be a non-leap year. This rule, however, has not been official adopted.