Julius Caesar introduced Leap Years in the Roman empire over 2000 years ago, but the Julian calendar had only one rule: any year evenly divisible by 4 would be a leap year. This lead to way too many leap years, but didn't get corrected until the introduction of the Gregorian Calendar more than 1500 years later.
Why is a Leap Year Necessary?Leap years are added to the calendar to keep it working properly. The 365 days of the annual calendar are meant to match up with the solar year. A solar year is the time it takes the Earth to complete its orbit around the Sun — about one year. But the actual time it takes for the Earth to travel around the Sun is in fact a little longer than that—about 365 ¼ days (365 days, 5 hours, 48 minutes, and 46 seconds, to be precise). So the calendar and the solar year don't completely match—the calendar year is a touch shorter than the solar year.
It may not seem like much of a difference, but after a few years those extra quarter days in the solar year begin to add up. After four years, for example, the four extra quarter days would make the calendar fall behind the solar year by about a day. Over the course of a century, the difference between the solar year and the calendar year would become 25 days! Instead of summer beginning in June, for example, it wouldn't start until nearly a month later, in July. As every kid looking forward to summer vacation knows—calendar or no calendar—that's way too late! So every four years a leap day is added to the calendar to allow it to catch up to the solar year.