Soils that get walked on or trampled will pack down until air can’t penetrate into the soil to keep the roots healthy. If a lawn has patches where grass won’t grow in spite of fertilizing and watering, it needs to be aerated. An aerator punches holes in the lawn ever few inches to allow air and water to penetrate into the soil faster and deeper. The easiest and best way to deal with the cores that are left on the surface is to mow over them and scatter the soil onto the lawn surface. This fresh soil brings up microbes which help break down thatch.
The frequency of aerating depends on the soil and the amount of traffic on the lawn. Athletic fields are aerated every few months. A yard on clay soil with active kids may need aerating every year. On the other hand, a yard with rich soil and lots of earthworms may never need aerating.