Degeneration happens (as you know) with inbreeding. Inbreeding means parents, siblings, cousins, grandparents. If you inbreed, the baby will have one red star, no matter how closely related it was. If you inbreed this baby again, that baby will have 2 red stars. And another inbreeding would mean the new baby would get 3 stars.
Getting rid of Degeneration works in the same way. Simply breed with a pet that is not related and the baby will have one less star. So if you breed a pet with 3 stars to a pet its not related to, the baby will have 2 red stars. Breeding this pet to an unrelated pet will result in a baby with just one Degeneration and breeding this pet without inbreeding would yield a normal un-inbred baby.
By the way, you are currently still in your trial period and have free Premium. This gives you a warning when you try a breeding that would result in Degeneration. Very useful ;)