A country will produce those goods that entail the lowest opportunity cost and least sacrifice. The two countries can then have more of both goods by engaging in trade. This is a general principle applicable not only to nations, but also to regions and even to individuals. The law of comparative advantage accounts for the benefits that nations receive from engaging in trade. Even though the law of comparative advantage seems to be a case for free and open trade between nations, that is not the way it is.
Governments restrict trade through the use of trade barriers.
Trade barriers are policies that restrict or stop the flow of trade among nations. Makes them more expensive. Price of the tariff is usually passed on to the consumer. Quota - a specified limit on the quantity of a foreign product that may be imported. Because there is less competition for US producers, this allows US producers to charge higher prices.