Kidney stones form when your urine contains more crystal-forming substances such as calcium, oxalate and uric acid than the fluid in your urine can dilute. At the same time, your urine may lack substances that prevent crystals from sticking together, creating an ideal environment for kidney stones to form.