A camera lens is a round barrel with several pieces of glass inside. The glass guides the light to the sensor. The quality of the glass used in the lens and other factors determine the quality of the image you get from the lens. Lenses come in a wide variety of focal lengths. They also come in a wide variety of aperture ranges.
A lens that has a large aperture with an f-stop value of f/2.8 or lower is considered a fast lens. It’s capable of taking pictures in low light at fairly fast shutter speeds. A fast lens also creates an image with a deliciously shallow depth of field.
That is one consideration when purchasing lenses. Another factor to consider is the number of elements used to create the lens and the number of groups within which those elements lie. An element is a piece of glass. When you have more elements, you have a more sophisticated lens that, as a rule, will capture sharper images.
Another consideration when choosing a lens is whether to choose a prime lens or a zoom lens. A prime lens has one focal length. If you want to get closer to or farther from your subject when you’re using a prime lens, you have to use good old-fashioned foot zoom. (That’s right; you have to take a few steps forward or backward.)
A zoom lens has a range of focal lengths. Some manufacturers create zoom lenses that try to capture everything from the grand expanse of the Grand Canyon to the hummingbird flitting around your bird feeder.
Some zoom lenses that have a focal length range from wide angle (28mm) to long telephoto (300mm) are convenient, but not as sharp at either extreme of the focal length or aperture range when compared to zoom lenses with a more conservative focal length range. A lens with a large focal length range is often referred to as a “vacation lens.”
So how do you know a good lens from a mediocre lens from a bad lens? You do some research. You can find reviews of popular lenses at Digital Photography Review.
When you buy your digital SLR, you may be tempted to buy a kit. A digital SLR kit includes the camera body and a lens. The “kit” lens usually includes a wide-angle focal length (usually 18mm) and a normal (55mm) or medium telephoto (105mm) focal length.
A kit lens usually isn’t fast (a lens with an aperture that has an f-stop of f/2.8 or lower). It’s also not the sharpest optic your camera manufacturer creates either. If possible, purchase the camera body only and purchase better lenses separately.