Although it is said that that it takes 365.25 days for the Earth to orbit the sun, the real number of days that Earth takes to orbit the sun is 365.2422 days. But, for this purpose we will follow the common notion of 365.25 days. Earth orbits the sun because the sun’s gravity pulls on our planet, this is the reason why some places have winter, spring, summer and fall.
Now, you might be wondering why we have a leap year every four years. This is because of the remainder of the days the Earth takes to orbit the sun and the fact that we only have 365 days in a year. So, when added up four times, we have to add one more day to our calendar to compensate for that error.