Tequila and mezcal are produced in different states of Mexico (though there is overlap).
Tequila can only be made, by law, with one variety of agave: the Blue Agave. Mezcal can be made with upwards of 30 varieties of agave, though most are made with the Agave Espadin.
The production process for mezcal is different from tequila which leads to a distinctly different flavor profile for mezcal.