All tequilas are mezcal but not all mezcal are tequilas. Mezcal are any agave-based liquor produced in Mexico, and therefore Tequila is a subcategory of Mezcal. They do share a lot of common points for that reason (agave based and Mexican to start with), but here are where they differ.
They are made with different base material – the agaves are different
Tequila can only be made with Blue Agave, many species are authorized by the DO of Mezcal.
Their DO sometimes overlap – they are not all made in the same states.
Both Mezcal and Tequila are DO, protected designation of origin and can only be produced in certain states of Mexico.
Tequila is made in 5 specific regions: Jalisco, Michoacan, Guanajuato, Nayarit, and Tamaulipas.
Mezcal is made in 8 specific regions of Mexico: Oaxaca, Durango, Guanajuato, Guerrero, San Luis Potosi, Tamaulipas, Zacatecas, and the recently approved Michoacan.
3 states overlap and make both tequila and mezcal: Tamaulipas + Guanajuato + Michoacan
They are not made the same way – handmade vs. industrially made ?
Mezcal is often more artisanally produced than Tequila.
A tequila harvest and a Mezcal harvest is essentially the same (with different varieties of agave).
How the piñas are cooked is where the process differs dramatically. Indeed, in most instances Mezcal producers use the centuries old method of baking the agave in an in-ground oven over firewood. The piñas are cooked in an underground, earthen pit. This underground “oven” smokes, cooks and almost caramelizes the piñas. This is where Mezcal gets its earthy and smoky flavours.
Once roasted, the piñas are crushed in old-fashioned stone wheel pulled by horse or donkey and then distilled in wooden barrels or clay or skin pots.
There are also industrial techniques in use, but in less proportion than for Tequila.
A last difference is in the distillation process; more pot stills or Filipino stills are used for Mezcal than for Tequila.