The lens has a published focal length. However, each color comes to a focus at different distances from the lens. Red with its longest wavelength comes to a focus further downstream then violet which has the shortest wavelength. The lens maker attempts to mitigate by selecting a variety of different lens shapes. A concave lens displays the opposite chromatic aberrations from its convex counterpart. A modern lens is made by combining a strong positive with a weak negative. This combination, if well executed, places the red and violet focal lengths on the same plane. If not migrated, the red image is slightly larger than the blue image. All the other colors have different focal lengths -- thus each has a different size image. The image we get is a composite of all these different sized images. The color fringe you see is from a poorly corrected lens for chromatic aberration.
This is called, Spherochromatism. IGOOD =fast telephoto lenses when used wide open are prone to this. It happens when a FAST long lens is WIDE open
Outlines of out of focus WHITES are green in the background, and Outlines of out of focus WHITES are magenta in the foreground.
Solution Smaller aperture, has increased depth of field, so less out of focus.