There are various opinions and theories about what causes it. What I have experienced is that sometimes a bird that has a prolonged hatching comes out of the shell with curled (sometimes even tightly curled) feet. Once the chick starts breathing air, its bones begin to harden. If the chick takes a long time getting out of the shell, the feet can start to harden before it gets out.
Most cases can be fixed with a combination of massaging the feet to gently stretch them and application of "chick shoes." It may take a couple of days working with the feet. I have had two chicks so far this year that I thought might need chick shoes, but in both cases the toes straightened on their own within a couple of hours. Search BYC for "chick shoes."
If the feet are not treated promptly, the bird may end up with permanently crippled or deformed feet. But prompt intervention fixes many cases just fine.