The only thing you have to know to understand how all lenses work is that light, when going form air into glass, will bend away from the surface of the glass. This is shown in the picture below:
The light (red line) starts in the air and hits the glass in the bottom half of the picture. As it enters the glass, it bends away from the surface as shown. (It is actually more correct to say that it bends toward the dashed line, which is perpendicular to the surface, but don't worry about it).
When light travels from glass into air, the exact opposite thing happens: It will bend toward the surface, like in the next picture:
If we put these pictures together, we can understand both convex and concave lenses. A convex lens can take parallel light rays and bend them together, as shown below.
Light comes in from the left, hits the glass and is bent inward (away from the surface). When it gets to the other side of the lens it is bent again on the way out, this time toward the surface, changing its direction even more.
A concave lens can take parallel light rays and bend them apart, as shown in the final picture. Again, each light ray is bent away from the surface in the way into the glass and toward the surface on the way back out.
(published on 10/22/2007)