Cyclogyl works by blocking the action of acetylcholine on muscarinic receptors in the eye, which leads to relaxation of the muscles responsible for focusing and dilation of the pupil. This effect allows for better examination of the interior structures of the eye.