Ok, here's the story.(At least what I've heard, prob not 100% accurate) There used to be only 10 months per year, hence SEPTember, OCTOber, NOVember, and DECember. Each month had the same number of days: 36. When Julius Caesar was in reign, he created two months and named one after himself - July - and one after his nephew, Augustus - August. He needed to take the extra days for the two months from each month, and so he took five days from January, March, May, October, and December, and took six days from February, April, June, September, and November. Still, he needed 7 more days, so he took them from the coldest month of the year: February. I don't know how the math works for that, but all in all, since Julius Caesar created two months, he needed 62 extra days, for the year, and so he shortened every month and made February the shortest, seeing as it was the coldest. As for Leap Year: The Earth takes 365 and 1/4 days to make a full rotation around the Sun, but instead of saying "Oh, New Year's is at noon this year," or "New Year's was at six this morning," people decided that we would have every fourth year with an extra day, because 1/4 of a day times 4 years is a full day.
Julius Cezar whom the months of July was named for was not satisfied having 30 days in his month took a day from February leaving 29 days and giving July 31 days. Augustus Cesar was jealous and did the same thing leaving February with 28 days and giving August 31 days.