What is the function of kidneys?
Kidneys filter out waste matter and fluids from blood. That waste is sent to excretion organs and passed out of the body. When the amount of fluids are less in the body (say,a person is not drinking enough water), there will be more solid waste that gets stuck inside the kidney. This waste turns into stone like structures resulting in Kidney Stones.