The idle speed screw is found in carbureted engines. While there are numerous ways to adjust idle speed in internal combustion engines, including automatically (as in the case of most cars and some motorcycles), I'll focus on idle speed adjustment in motorcycle engines. Idle speed in most motorcycles is governed by the idle speed screw placed against the throttle slide. It controls how much the throttle can close, which serves to regulate engine speed when the throttle is completely released.
With motorcycles, the idle speed screw is usually easily accessible to the rider, which is a plus, given the finicky nature of motorcycle engines before they warm up. Since most motorcycle engines are carbureted, being able to easily adjust idle speed is a major saver of your right wrist in cold weather. It will not help you much in changing altitudes, as in riding over mountains, as it has little effect on fuel-air mixture (you have to mess with the carburetor jets for that).
If your car or motorcycle is equipped with a tachometer, you can adjust your idle speed more easily to match the recommended idle speed in your operator's manual. Otherwise, you'll have to adjust idle speed by guesswork. Too low an idle speed, and your engine will quit on you easily, which could create potential safety situations in traffic. Also, low idle speeds mean low oil pressure, which means engine wear. Too high an idle speed, and you also increase engine wear, but more urgently, you run the risk of engine overheating at long stops, especially on air-cooled bikes. You want to aim somewhere between the two, and adjust as needed.
(thanks to ABraut for pointing out the problems with oil pressure at low idle speeds!)