We review the pathogenesis of cholesterol gallstones, which occur in five steps: 1) metabolic; 2) chemical; 3) nucleation, 4) growing and maturation of gallstones; 5) clinical. It is emphasized that in the third step it could occur an arenous precipitate formed by cholesterol crystals, calcium bilirrubinate granules, calcium phosphate, or fatty acids anions and calcium, and mucin, called "biliary sludge", which has been associated with cholecystitis and pancreatitis. We describe the gallbladder motor abnormalities that occur during the lithogenesis and the diagnostic approach through scintigraphy and real time ultrasound. We review the pancreatobiliary dyskinesia, a condition associated with the postcholecystectomy syndrome. This later condition can result from anatomic stenosis or dyskinetic dysfunction of the sphincter of Oddi. Likewise, it is pointed out that at the present time, the manometric evaluation of the sphincter of Oddi is the gold standard in the diagnostic approach of this condition.