Baby teeth fall out and are replaced by adult teeth just like us.
If, by a certain time (your vet will tell you when), they don't come out they need to be pulled or bacteria gets stuck between the baby and adult teeth. There can also be crowding issues, etc. Removal of retained teeth can be done at the time of spay/neuter in most cases.