How do you get foot cramps?

How does this happen? And why are they so damn painful?
How do you get foot cramps?
Post Opinion