Hi,
today I will write about a year. The thing is that as in many other subjects when you look down into the simplest things you might find that they are not as simple as they seem. So how long is year? 365 days? 366 days?
You very well know that every 4 years we have 1 extra day in February. You might also know that this is because year is not 365 days long exactly but roughly 365.25 .. its important to say roughly because it is not perfectly true and it matters how you define one year.
First lets see how we define one day. One would say that it is the time that it takes for Earth to rotate once. Problem is that we need to define some object to compare it to, some ground, some reference point. It might be the Sun, but Sun is too close and since we go around it, this would change the length of the day.
Sidereal day is the day that is defined as a rotation of Earth around its axis compared to very distant stars that are relatively stable. 23.9344699 hours… that is pretty close to 24 that we use, but it is not what we use.
The thing is that we decided to use what is called solar day, which is in fact compared to Sun. As Earth rotates around its axis, it also rotates around Sun, which makes the solar day different length.

This is how the effect looks like. You need to turn Earth n.2 by little bit more since it moved around the Sun too.
Problem is that the length of solar day changes since our orbit is sligthly elliptical and when we are closer to Sun we are faster which means that the solar day is shorter and there is more time needed for the same spot to face Sun again. This effect adds up to almost 365.25 solar days in a year. If it was so simple we could just add one leap day every 4 years to make up this 0.25 difference but it is actually 0.242181 which makes difference over time.
Julian calender ran with 0.25 for a long time but after about 1500 years it was already 10 days behind of the real date and Christians wanted to predict Easter exactly so they changed on Gregorian calendar. This calendar is the same, except that if the year is divisible by 100 it wont be a leap year, though if it is also divisible by 400 it will be a leap year. This almost fixes the problem, though every 3216 years one day is still off from the real time. Yup. Check out this video to see how we can improve this slight mistake:
https://www.youtube.com/watch?v=qkt_wmRKYNQ
So thats it. But you can not really capture the length of year or day since it changes all the time (effect of other planets and what happens on Earth). Check out this video which I used mostly as a source, it has got cool animations that will help you understand it:
Dragallur