Quotas and tariffs are methods that can be used by the government of a nation to restrict the number of units of any product from entering the nation as imports.
A quota is a limit that is placed on the number of items that can be imported. For example, if the quota for apples imported from Canada by the US is 100,000 per year, only 100,000 apples can enter the US from Canada. Once this limit is reached, exporters in Canada are not allowed to send any more apples across the border. Tariffs serve the same purpose by reducing the demand of goods by customers. Continuing with the earlier example, if the government of US wants to restrict the number of apples that are imported from Canada it can impose a tariff on them; this increases the price at which American customers can buy the apples. As the demand for products decreases as the price increases the tariff reduces the demand for Canadian apples and a smaller number is imported.
Quotas and tariffs do not allow free trade between nations. Resources in all nations are used optimally when the number of units of any products that are imported or exported is determined only by supply and demand. Artificially created restrictions do not allow this to happen. But it should be kept in mind that though free trade is ideally the best alternative, in reality there are many other factors that have to be considered while creating a policy on imports and exports. In a large number of cases, the imposition of quotas and tariffs is justified to serve other purposes. In the example given earlier it may be right for the US to restrict the import of apples from Canada if that adversely affects US farmers.