A magnifying glass is simply a convex lens meant to be held up to an object to see it magnified. It is a very simple form of microscope, and its invention allowed many later breakthroughs in optics to occur. The magnifying glass is most notably seen in mystery fiction, and is iconically associated with the fictional character Sherlock Holmes, who used one to study the scene of a crime in order to locate clues.
The earliest magnifying glass recorded was created by the master scientist Alhazen in 1021. He published a comprehensive work, The Book of Optics, which laid out many principles of optics and many interesting devices. One of these was described as "a magnifying device, a convex lens forming a magnified image." This basic invention went on to inspire many others, including the microscope, which helped revolutionize the fields of biology and chemistry.
The magnification of a glass is determined by the optical power of the lens and the distance it is held from the object being viewed and from the eye. A typical one would be labeled as a 2X magnifier, implying that the size of objects viewed is doubled, although this is likely to be better than most average users would achieve. On the other hand, someone with relatively poor eyesight could use such a tool to achieve an even higher relative magnification.
Although some people think that a magnifying glass is cutting off the area being viewed, in reality, the area covered by the glass is the area shown. Unlike a straight viewing, however, some areas are much larger than they would be with the naked eye, while others are much smaller. Each point viewed under the lens has its own ideal focal distance, which is why most people will move the glass closer and further from the object being viewed to find the ideal distance.
The best way to think about how a magnifying glass works is to imagine it in a two-dimensional situation first. If a person imagines something underneath the glass, like a ladybug, he can then imagine two lines coming up from either side of the insect into the air. Under a normal piece of glass, those lines would just travel straight and never meet, and the viewer would see both points of the ladybug relative to where they actually are. With a magnifying glass, however, the light is bent such that the two invisible lines eventually meet in the air. An ideal distance has that point right at the eye.
After these two imaginary lines meet, they will cross and pass each other in the opposite direction. This is why at an extremely close distance, an object under the lens may appear to be upside down. The light has just kept moving, but has flipped its orientation as it is viewed.