When the Spanish arrived in the New World, they brought the scourge of disease and domination over the indigenous peoples. One beneficial thing they brought (for us) was the art of distillation.
For centuries before the Spanish arrived, the native people of what is now Mexico fermented the local agave plant to make a drink called pulque. With the new methods of distillation, the pulque became mezcal.
Mezcal is a distilled spirit made from the agave plant. It may be made from a number of different species of agave, and can is produced over a wide part of Mexico. This is opposed to Tequila, which is only made from the blue weber agave species and is predominantly made in the Mexican state of Jalisco. One way of looking at it is to say that Tequila is a subset of Mezcal.
Mezcal production is similar to Tequila. Agave are harvested and chopped down into pinas. These are then baked in wood or charcoal ovens to convert the starches to simpler sugars. Mezcal picks up some of its smoky, earthy flavor from these wood ovens. In contrast, for Tequila, the pinas are steamed.
After cooking, the juice is extracted and is fermented naturally to produce a mash. At least 80% of this juice must come from agave, whereas with Tequila, a minimum of 51% of the juice must come from agave.
The mash is distilled twice and then either aged or bottled. Sometimes a worm (actually an insect larva) is added. The worm used to be added to affect the flavor, but today, it is mostly a marketing tactic.
Mezcal has the same basic classifications as Tequila. A blanco is aged less than two months and is clear in color. A reposado is aged from two months to a year. These mezcals have a straw color. Anejo mezcal is aged for more than one year and has a darker hue with more wood notes.
A great deal of mezcal is just bottled after distillation with added color to achive a gold spirit. This is what you're most likely to see in markets outside of Mexico.
Most Mezcal is known for being rather harsh and, for lack of a better word, provincial. Especially in the United States, Mezcal has a rough reputation--you make someone prove their manhood by ordering them a shot of Mezcal. It can be fiery, smoky, raw, and unbalanced. And then there is the worm.
More recently, Del Maguey has started producing higher quality mezcals that are less harsh, more balanced, and quite complex. They have "single village" labels from particular villages akin to French wines that are sourced from a single village's vines. Del Maguey considers worms to be a marketing gimmick and dispenses with them. If you want to experience the full potential of mezcal, give Del Maguey a try.