Wikipedia has some information about the subject and talks about leap years but I find their explanation rather confusing.
The Hebrew calendar is completely lunar - if you tell me the date, I could tell you the phase of the moon. However, since 12 lunar months is slightly less than a full solar cycle, every few years an extra month is added, so that the seasons don’t go out of whack.
It’s the addition of that extra month that makes it not completely lunar. A comnpletely lunar year starts to go out of phase with the solar year and “drifts” through the solar year, so that what was your summer month eventually gets to be a winter month, then after an equally long time gets to be a summer month again. The Muslim calendar is a truly lunar calendar, with no compensating month added.
Follow-up question: So if some jewish years contain leap months, what do jewish people who need to commemorate certain dates that only fall on leap years do? For example, say a parent died during a leap month. I believe jewish people are supposed to go to synagogue and do special prayers every year on the date of their parent’s death.
During leap years, a second month of Adar is added. Anything which needs to be observed in Adar II is observed in Adar in non-leap years.
And someone who is born early in Adar II will celebrate birthdays in non-leap years sooner than someone born late in Adar I or in an ordinary Adar. But anything that is to be commemorated in Adar II is simply commemorated in Adar in an ordinary year. There are 7 leap years in every 19 year cycle and that is off by about 2 hours in every 19 years or about a day every 2 centuries. AFAIK, there is no provision for correcting that drift. Since the current calendar dates from the early Christian era it has now drifted by about 8 days. Not yet really noticeable, but in another few millenia it is will be.