The most common investigation to detect the presence of gallstones is an ultrasound scan of the abdomen. Your doctor may also recommend some blood tests to look for problems related to the stones.
At times, a CT scan may be proposed to you if your doctor is also looking out for possible tumour growths in your abdomen.
When there is a suspicion of a gallstone being migrated into the bile duct, a special MRI scan known as MRCP may be required to study the bile ducts specifically.
This will help your doctor to decide the next course of action, including the option of using a special endoscope to remove the migrated stone through a process known as ERCP (Endoscopic Retrograde Cholangio-Pancreatography).
Just as a side note, gallbladder stones found incidentally without any symptoms do not need to be removed most times. Those stones which induce pain or discomfort will require surgical removal in general.
Having said that, gallbladder polyps, which carry a risk of cancer, may be mistaken as gallbladder stones from time to time. If you are found to have any gallstones, do speak with your doctor regarding the proper follow up plan.