A camera lens is essentially the eye of the camera. It utilizes optical glass elements to bend and focus light in precise ways in order to create an image.
There are several common types of camera lenses, each with different purposes and characteristics:
These are the most versatile, letting you quickly adjust from close-ups to wide shots.
These produce sharper and more focused images and work better in low light. (no zoom)
These make distant objects appear much closer, and are best for wildlife and sports.
These capture tiny details and are ideal if you like capturing flowers, insects, etc.
Many photographers use a combination of zoom lenses (for flexibility) and carefully chosen primes (for image quality). There are additional lens types for creativity, such as ultrawide, fisheye, and cinema.
The key is picking the right lens for the shot and style you want. It takes experimenting to learn how they affect your photos.
Also, don’t be afraid to buy a used lens in good or excellent condition. Most are just exchanges for different lenses based on that photographer’s needs, so you’ll save quite a bit of money and take the same quality of photos.
The most important specs of a lens are the maximum aperture (how much light it lets in), focal length (controls the angle of view), and minimum focusing distance.
Image quality characteristics like sharpness, aberrations, bokeh, etc. vary with the lens construction and glass elements used. Extra features like image stabilization, weather sealing, and specialized coatings are also important lens considerations.
Long story short: the better the specs, the higher the cost.