The Wikipedia page Chromatic aberration goes into some decent detail about how lenses can be designed with less chromatic aberration, or how it can be corrected in post-processing.
Once you have an understanding of the difference in magnification between the different spectral bands, you apply a resampling to align the laterally separated color channels with each other. You can apply chromatic aberration correction using our Radial Geometry module. For more detail, see this post: Closing the Loop: Distortion Correction.