When snapping is enabled, moving an object within the snap zone of a grid location will cause the object to snap to that location.
Step1. Click the Snap panel and check the Snap to Guides box command to control snapping to guides.
Step2. You can also check the Snap to Document Grid box which will control both snapping to document grid and the baseline grid.