You're born with them (I have 'em). I did a Google search to check, and while basically it's stated that they're hereditary, I didn't find any definitions I liked, so I'm not linking to any. It's more common to have one on both cheeks (like me) than to only have one, on one side; and chin dimples (known as cleft chins) are possible too. One can also acquire dimples through plastic surgery, for about $500 per cheek.

One site also said one could potentially get a dimple through an injury, but could provide no proof or cite any examples.