Who benefits from a tariff or quota? Who loses?

Who benefits from a tariff or quota? Who loses?