Gallstones form when certain substances harden in the gallbladder or bile ducts. Risk factors include family history, being a woman over 40, obesity, high-fat diet, and certain medical conditions. Gallstones can cause inflammation of the gallbladder, blockage of ducts, pancreatitis, and rarely cancer. Diagnosis involves ultrasound, blood tests, and endoscopy. Treatment is usually surgical removal of the gallbladder to prevent complications from gallstones.