Gallstones are hardened deposits of digestive fluid that can form in the gallbladder. They form when there is an imbalance in the substances that make up bile, such as cholesterol or bilirubin, leading to crystallization and stone formation.