The Snap to Guides command enables and disables snap to guides. When snap to guides is enabled, the guides you set (see Show Guides) almost seems magnetic; when you move a layer or selection, the guides appear to pull on it when it approaches. This is enormously useful for accurate placement of image elements.
You can access this command from the image menubar through View → Snap to Guides.