Choose View > Grids & Guides
and make sure that Snap to Document Grid is selected (checked).
If it is not selected, click it.
Note: The Snap to Guides command controls both snapping to
guides and snapping to the baseline grid.
To specify the snap-to zone, choose Edit >
Preferences > Guides & Pasteboard (Windows) or InDesign >
Preferences > Guides & Pasteboard (Mac OS),
type a value for Snap to Zone, and click OK. The Snap to
Zone value is always in pixels.
To snap an object to a grid, drag an object toward a
grid until one or more of the object’s edges is
within the grid’s snap-to zone.