The snap-to-guides feature helps you align components, vias, or traces to other nearby objects. Enable snapping to guides by clicking in the lower right corner.
You can also simply snap to grid. Hold the Shift key to temporarily toggle the snap setting between “guides” and “grid”.
In the majority of cases you will want to snap to guides (especially when routing traces). But you can speed up the performance of the editor by setting the Snap setting to grid by default and engaging snap-to-guides using the Shift key only when you need it. If you zoom in you will focus the snap guides only to the objects you see.
Here’s a video showing how it works.