Bezoars are compact masses of undigested material that accumulate in the gastrointestinal tract, most commonly in the stomach, and can occasionally travel into the intestines, leading to obstruction.