The surface of a lens is usually curved. When light passes through a lens its path is changed. A lens placed close to a lamp will make the light into a strong narrow beam which shines brightly in one direction. This kind of lens is found in a lighthouse.
LEDs in modern torches also have lenses in front of them.
Note that both lenses and dished mirrors can make the light into a beam, although they work in different ways. This is why some torches only have a flat glass cover and not a lens in front of the bulb (see: reflector).