Yes, that's correct.
The purpose of leap years is to keep the calendar in sync with the Earth's revolutions around the Sun. Since a solar year (the time it takes for the Earth to complete one orbit around the sun) is about 365.24 days, adding one day every four years compensates for the extra 0.24 days per year. This helps to prevent the calendar from drifting out of alignment with the seasons over time.