What is the difference between tequila and mezcal? How are they similar? How are they different?

What is the difference between tequila and mezcal? What are their similarities and differences? Which one do you prefer?