The standard line is that tequila is a type of mezcal meaning that the word mezcal is an umbrella term for all agave based distillates. This is all correct and a good starting point for the discussion even if it doesn’t do justice to the different techniques that really distinguish the two expressions of agave and it always fails to mention other family members like Sotol.
Fortunately we have the dedicated minds behind Mezcales Tradicionales to help. Their recently published explanation of exactly what makes tequila different from mezcal delves into all the legal details and offers the full story in succinct form. It’s in Spanish so you’ll need to focus your language skills but it’s well worth the work.