If the grid is switched on (toggle with "g"), all objects except for line labels will be "clipping" to this grid. (This applies only to newly positioned objects. The position of object already on the canvas will not be altered by switching on the grid.) This means that the endpoints of lines, or the center of free-floating objects, are placed at a grid point if one moves them close to the grid point.
The grid points are shown on the canvas, but are not included when the diagram is exported as an image or a PDF. This also holds for the other auxiliary options like Helper lines or Show active object. The spacing of the grid points can be changed from the menu View > In(De)crease grid spacing, or through the associated keyboard shortcut, see View > Show keyboard shortcuts.
In addition to the visible grid points on the canvas, every line on the canvas introduces a "local" set of grid points along this line, roughly at the same distance as the visible grid points on the canvas. If the grid is active, lines can be connected with one another only at these line-specific grid points.
Sometimes one may want to have an object to be located off the grid. This can be achieved either by temporarily switching off the grid (by pressing "g"). An object placed without the grid will remain at its (possibly off-grid) position even after the grid is switched back on. The other option to place an object off the grid is via EditFrame, which allows one to specify the coordinates of the object in pixels.