To align two objects together, select them both, press the align icon (or use the L key) and you’ll be able to choose the nodes the two objects can mutually align to. Clicking on one of these nodes will move both of the selected objects to a new, aligned location.
But what if you don't want both of your objects to move? Fortunately, it's also possible to move one object into alignment with an object that remains stationary. This is called aligning to a reference, and it requires just one extra step.
To align to reference, select two or more objects to be aligned, press the align icon (or use the L key), then select the object you’d like to use as a reference. You’ll see that the alignment nodes now only appear around the reference object, which stays in place while the other objects align to it.
The following video by Rob Morrill outlines these two techniques.