This command can be found at View->Snap to Grid.
This option in a way magnetizes the grid you have set (see Show Grid). When you move a layer or a selection, they will get automatically onto the grid when they are near them. This allow to place them accurately.