First and foremost, if you have the option of buying branded glass, you should almost certainly do it. By that, I mean lenses built by Nikon or Canon. There are a few special cases (that I can detail) where an off-branded lens is in some way superior to it's branded equivalent, but that's a rare occurrence.
|Nikon 35mm f/1.8G|
Generally, if you can buy a prime lens, that is, a lens that have a single focal length (for example, 35mm) instead of a zoom, that is, a lens that has a range of focal lengths that you can zoom through (for example, 18-200mm). Zooms are far, far more complex operations as far as the optics are concerned, and generally it can be said that image quality suffers: zooms sometimes have complicated distortions that can't be easily removed through post-production.
|Nikon 18-55mm f/3.5-5.6G|
Zooms that are also "fast" lenses (lenses with a maximum aperture of f/2.8 or greater) are not very common, difficult to design, and generally are much more expensive. For example, Nikon's 18-55mm f/3.5-5.6 (the range of apertures denoting the maximum aperture at 18mm and 55mm, respectively) retails for around $120 (and is a steal at that price, for an amateur just starting out), whereas the 17-55mm f/2.8 (indicating that the lens has a maximum aperture of f/2.8 through the entire length of the zoom) retails for around $1350. The 17-55mm lens has almost exactly the same focal range (17mm is a bit wider than 18mm but in general it shouldn't make much of a difference) but because it is a much faster lens (and therefore is much more versatile) and because it is a professional lens (made almost entirely of metal, instead of the all-plastic 18-55mm), it is obviously much more costly.
|Nikon 17-55mm f/2.8G|