Problems with Lenses
If you buy from Ebay, or any inexperienced or dishonest seller, it is good practice to check your equipment for problems. 50% of the equipment I buy has some major issue that the seller doesn't recognize or hopes I won't recognize. If you receive a bad item, don't be shy, get a refund.
Inspecting the Lens
Turn the focus ring and slide or turn the zoom ring. They should turn smoothly and evenly. Some lenses use lightweight grease so the ring will turn faster but it should still turn evenly with some resistance. The rings should not spin freely or catch as you turn them. Scratching sounds are a good sign that the lens needs a regrease.
It's a good idea to clean the front and rear elements before doing a glass inspection. If the lens has a filter on it, remove it. If the filter is stuck you will need to be very patient and work to remove it. Make sure you blow off any debris before you apply a moistened wipe. If debris is on the glass surface, when you wipe it, you will scratch it.
Remember to check the filter thread for dents.
Hold the lens up to the light and look through it from both ends. You may see specks of dust and that is normal. You may be tempted to use a flashlight, but I don't recommend it unless you suspect an issue. Flashlights make minor imperfections look major. Remember that you are looking at multiple surfaces of glass in the lens. Your will need to look closely in order to see everything.
You are looking for fungus, mold, haze, separation, pitting, cleaning marks and oil. All of these issues will affect performance to varying degress depending on the severity of the issue. Some issues are fixable and some aren't. If you are not a repairman, and the seller didn't make you aware of problems, you should return the lens to the seller. Cleaning marks are obviously not cleanable. If they are deep and plentiful it will affect image quality. There are several types of fungi that grow in lenses. If fungus sits on the glass long enough it will scar the glass permanently. Haze that is caused by condensation may be cleanable, but that is rare and all other types of haze are impossible to clean. Mold, which is a fungus, will permanently damage a lens. Separation is rare but can occur in any lens. It is not fixable and will affect image quality. Pitting is something we see on glass everyday. It is usually caused by debris hitting the lens. Your car's winsheild is probably covered with pitting. Eventually it will ruin the glass. Use a quality filter to protect your lens.
Turn the aperture ring and check to see if the iris is opening/closing. Most vintage and some modern lenses have a spring lever that can be moved to operate the aperture. The iris should quickly open/close when this lever is sprung. Some lenses have pins. Modern electronic lenses do not have an aperture lever. Old, non-auto aperture lenses do not have an aperture lever. Canon FD lenses must be mounted on a body in order to see the aperture move. If you have a Canon FD lens and the aperture seems to be stuck at f5.6, don't freak out, this is normal. If your aperture isn't working it is likely that there is oil on it or its mechanism. Lenses are greased in order to make the focus ring move smoothly and positively. Over time the grease can make its way down to the iris assembly. The only way to fix it is to physically clean it. If you are not experienced with lens disassembly do not attempt it. Send the lens back to the seller.
NOTE: Never spray WD-40 or put oil in a lens.
If a filter is stuck on the lens you must fight the urge to forcefully remove it. It is far better to spend a day safely removing the filter than to risk scratching your lens. When you forcefully remove a filter there is a strong chance the lens will be scratched.
Use a filter wrench. Most stuck filters will come off with the aid of a filter wrench. Make sure you buy the right size and always turn counter clockwise to loosen.
You may have success with a jar gripper.
If the wrench or gripper doesn't work the filter is probably seized. You can try heating the filter with a hairdryer and making another attempt with the wrench. You can also try icing the filter with an ice pack.
If heat and cold don't work you may be tempted to use WD40 but don't do it. It will not penetrate the threads and any excess fluid will make gripping the filter much more difficult and it may run down into the lens barrel.
At this point you will need to use a larger wrench. If the filter is tall you may have enough surface to use a strap wrench. Remember that these wrenches will apply enough force to break your lens mechanisms.
If the strap wrench doesn't work then you are faced with a tough decision. The only way to remove that filter is to physically cut through the filter rim. A Dremel with a cutting disc is a good choice. If you have a good mini hacksaw you can use it to cut the filter rim down to the glass. This will likely break the seal and allow the filter to turn. You may choose to break the filter glass while holding the lens upside down. Then you can cut the filter with a saw or a pliers.
WARNING: FILTER GLASS IS NOT EASY TO BREAK AND IT WILL SHATTER INTO A HUNDRED TINY PIECES. IT IS LIKELY THAT THE LENS WILL GET SCRATCHED. MODERN PLASTIC LENSES WILL USUALLY BREAK UNDER THE STRAIN OF USING A WRENCH.