Pups can be born with it, sometimes will disappear on its own, sometimes needs op. some say it can be genetic and dogs that have the tendency should not be bred from, don't know if there is any truth in that statement or if its just another old wives tale.
No doubt some of the vets on here will be able to answer your questions.