Compensating eyepieces work by incorporating additional lens elements that counteract the residual aberrations left by the objective lenses. When light passes through the objective lens, it can be refracted in ways that cause distortions or color separation. Compensating eyepieces correct these distortions by realigning the light paths, resulting in a more accurate and focused image. They are often marked with a "K" or "C" to indicate their compensating nature.