These are also sometimes called 'fringe' or 'fringing' and it is because they look like a fringe of an unwanted color between a very dark and a very light transition. Say I took a photo of a person wearing a black shirt against a bright sky background. Right at the edge of the shirt, I might see a faint line of red, green or purple fringing out into the sky. It isn't very large, but it gives the shirt this funky outline. Sometimes it appears at the edge of a mountain peak, or the line of a roof. It's a problem only in bright/dark edges. It is a flaw that can't really be avoided, but it can be decreased if you have more expensive lenses.
I don't have horridly expensive lenses, but they are from Nikon. I have some chromatic aberration, but not a lot.
I've seen some extractions that are subtle fails because the person doing the extraction decided to include just a few pixels of the background inside the area they extracted. I'm considering the use of the de-fringe option in Lightroom to see if that background can be treated like a chromatic aberration and dealt with.