Some online photographic stores have lenses that are marked as “rare”. This is sometimes a bit of a red flag, because as is often the case, these lenses are not really rare. Rare sometimes indicates that the seller has priced the lens high, even if the lens has defects. It is possible that “rare” emanates from an internet search that found few comparable lenses. For example there is nothing rare about a Helios 44-2 58mm f/2 lens, certainly not one that usually sells for under $100. There may be some early versions of the lens, e.g. the early “silver” ones, that are less common, but the lens itself is not rare. Rare lenses do exist, but these are usually rare because few were produced, or few are available. The Helios-40, 85mm f/1.5 is a less-common lens, and could rightly be portrayed as rare. In many respects it would be better to use the term “uncommon” when describing lenses that have low availability, leaving “rare” for the truly rare lenses.
Truly rare lenses include the likes of the Fisheye Nikkor Auto 6mm f/2.8, which can be worth upwards of $150K. The Canon 50mm f/0.95 on the other hand could probably be considered uncommon, as only 20,000 were produced. The Konica Hexanon 60mm f/1.2 is even rarer, with only 800 units supposedly produced. However it is fairly hard to define a Zeiss Sonnar 135mm lens as being rare, because a lot were produced, and there is nothing inherently special about them just because they are branded ZEISS (they sell for about C$75) – vintage 135mm lenses are a dime a dozen. The only rare 135mm lenses are those from companies who produced very few, or the lenses themselves had some sort of interesting or exclusive characteristic.

There are many reasons a lens could be considered rare. Vintage lenses with small focal lengths, or super-fast speeds (for a particular period) will always be quite rare, because few were likely produced (they were expensive to produce). A good example is the Vivitar Professional 135mm f/1.5 (T-mount) – nobody would necessarily use the terms Vivitar and rare in the same sentence, but is a special lens. Possibly only a few hundred of the 135mm lenses were made, having been originally produced for NASA in 1966-1967. But it’s claim to fame is that it was a superfast 135mm (and it was super large, 140mm long, 100mm diameter, and 2kg in weight). There are few, if any, on the market today.
A further reason is that a lens may represent the first of a series, or has some particular historical significance. A good example is the first 35mm macro lens, the Kilfitt Macro Kilar D 40mm f/3.5. Or perhaps it is rare because it is a pre-war lens – for example associated with the release of the Kine Exakta, the first 35mm SLR. A good example of this is the famed Biotar 75mm f/1.5, released in 1939, and was the fastest portrait lens at the time. Still another form of rarity – one where a lens is very rare in one version, but commonplace in another, even though both versions being optically identical – usually has something to do aesthetic differences between the the lenses, or the amount of time it was in production.
Some lenses are marked “rare” for the pure shock value – because if people think a lens is rare, they will be more likely to purchase it. So before buying a lens make sure to determine whether the lens is in fact rare, and whether it warrants the price being asked. In addition avoid purchasing a rare lens that is severely deficient, e.g. has stiff focusing or aperture mechanisms, or optical fungus. Spending $1000 on a defective lens, even if it is rare, is somewhat foolhardy (unless you are a collector, and have no plans to actually use the lens). It can be very challenging to have a rare lens repaired, depending of course on the type of damage – first it is hard to find someone to repair it, and it may also be hard and expensive to find parts (rare lenses means rare parts). For example I’ve seen one ad for a Konica Hexanon 57mm f/1.2, for C$500, cited the lens as being rare, with a series of caveats – internal spots of fungus on the optics, and stiff focus, and aperture mechanism. It turns out this lens is one of the least rare Hexanon lenses.
Note that some sellers use the term “rare find”, which is somewhat different in context. A rare find implies that there aren’t many available at a particular time.
P.S. Another term to be wary of is “mint”, which means pristine, or unblemished. Is it truly possible to define a lens as being devoid of all defects? Most vintage lenses contain contain at least some sort of dust internally (unless it was stored in its box in the right conditions for the past 50+ years).