As a sticky, this thread should really consist of sound, pithy advice, rather than debate. Huge respect to
@Ian C for making us understand the relative importance of alignment behind and in front of the lens. I'm a scientist, so precision has a fascination for me, and it's fun to consider what tools you might use to check alignment. But like
@Ian C I'm also a pragmatist, and I am saddened when people believe that they must have expensive or complicated tools to set up an enlarger to give high quality images, especially if - like me - they don't have a professional-level enlarger. There's nothing original in the following, but for the sake of balance and for beginners I think it's worth spelling out a pragmatic cost-free approach.
My reasoning is as follows. Your print is going to be judged by human eyes, not with a grain-focuser, or a magnifying glass. For instance, if I make a 16x12 print, it is likely to be viewed at 4 or 5 feet. So if the enlarger is set up to deliver what appears sharp when viewed at a mere 12 inches from the easel, it is utterly pointless striving for more precise alignment, even if biting sharpness or texture is the whole point of the image. A few people (mostly other photographers

) may study your photo at the closest distance the human eye can focus (12-14 inches), but no-one is going to bring a magnifier to your exhibition. This is not sloppiness, you can still be super-critical, but use your eyes to do it.
But it's difficult to judge sharpness from most negatives under the enlarger. You could focus on the grain of the image, but affordable grain focusers don't work near the edges of the projected image, and it's hard to assimilate what is happening across the field by looking successively at tiny parts of it. So a test negative is a pragmatic option, but you really don't need anything fancy. Take a piece of fully exposed and developed film (e.g. from the film leader if you use 35mm) and using the tip of a sharp blade and a straight edge, scratch a grid of lines on the emulsion side. The grid doesn't need to be neat, but the scratched lines do need to be quite thin, and the grid must extend across the whole image area. If you have got the lines too thick or too thin, you will recognise that when you try it, and you can just do it again on another bit of film.
To give yourself the best start, ensure that your enlarger baseboard or bench is horizontal front-to-back and side-to-side. Use any spirit level here, even the one in your phone; but when it reads 'level', reverse the device to check that it says the same thing in both orientations! Then check that the easel placed on the baseboard is also level. If not, stick pieces of sheet rubber or cork under its feet until it
is level. These simple checks are perfectly adequate on this side of the enlarger lens.
As far as is possible, check that the enlarger column is also now vertical. If the column is angled forward, that may be impossible. But again, as deviations here affect the less critical part of the projection path, stopping down the lens should mask all but the worst faults. My enlarger column stands straight, but it sagged forward when the head was raised, so I braced the top of the column to the wall (with an adjustment in case of tectonic plate movements

).
Now the critical part, the relationship between the lens and the negative. Place an old, flat print of the largest size you intend to make in the easel, emulsion side down: the back side makes a great viewing surface. With any random negative in place, raise the enlarger head so that the image area just covers the paper. Now substitute the scratched test negative, open the lens to full aperture, turn out all other lights, and study the projected image. Use the focus knob to get the lines in the centre of the grid sharp. You will easily notice if all the edges and corners are less sharp than the centre. That could be an issue of film flatness; or possibly a mediocre enlarger lens, and it's fairly obvious what to do about those issues. But if one edge of the grid is sharp and the opposite edge is not, the negative and lens are very likely not parallel. Unless the enlarger is a fancy one with some means of adjusting the lens plane, you will have to shim the negative carrier. As a temporary measure, slip a small strip of thin card (e.g. cut from a cornflake packet) under one side of it. Maybe you will need 2 or 3 thicknesses of card. Mine has 2 (Kelloggs

), now glued in place after a trial period. It's worth taking time over this, but at worst it may take you 30 minutes of experiment to satisfy yourself that everything is now sharp (plus a few weeks of printing before you realise you may as well glue the shims in place). Just beware of negative 'popping' if you leave the enlarger on for more than a few minutes - do the job in short spells allowing the negative to cool in between, and apply the same principle when you print.
You should have no need to do this procedure more than once, unless you move house. I have checked mine periodically over several years, and have not needed to change anything.