How do i snap in place with a cube

Ok so how do i snap a cube on a grid or on another cube???

Turn on snaps in the editor. Edit/Snap Settings. Once things are snapped, if you want them to only move by the snap increments then hold down (um, well it's the special Mac key on Mac, I don't know about windows, probably alt) and then drag them around.