The idea of comparative advantage still gets banded about in discussions of trade as a justification for the need for free trade. But for developed countries like the US, comparative advantage doesn't really matter anymore.
Formulated by the British liberal economist David Ricardo (1), the idea of comparative advantage states that a country that has an advantage in producing a good, due to natural resources or environment, over that of another country should produce more of that good and trade the excess with the other country for something that is produced with an advantage over the first country. For example, Haiti has an advantage in producing sugar compared with Canada, which has an advantage in producing Maple syrup. If Haitians want Maple syrup and Canadians want sugar, then Haiti should produce an excess of sugar and Canada should produce an excess of Maple syrup. Both would then trade their excesses to each other to satisfy their needs. Ricardo showed that by this mechanism both countries would actually have more of each product than if they were to produce both products themselves. Canada is said to have a comparative advantage over Haiti in producing Maple syrup because of Canada's climate which is ideal for growing Maple trees, whereas those trees would not grow so well in Haiti. Thus for the same effort and resources expended, Canada can produce more Maple syrup than can Haiti. Similarly, Haiti has a comparative advantage over Canada in producing sugar. Thus, if each nation produces those product for which it has a comparative advantage, the total amount of goods from both nations is more than if they each tried to produce all the goods themselves.
Some other products, such as minerals, can also be subject to a comparative advantage. For example, if one country has coal that is easy to mine because it is near the surface, while a second country has coal that has to be mined from deep underground at great expense, then the former country has a comparative advantage over the latter in producing coal.
The key to this principle is that the comparative advantage of a good is due to some native condition which is not transferable from one nation to another, or more specifically from one location to another. E.g. the climate of Haiti can't be transferred to Canada. The advantage is permanently
tied to the land of the controlling country.
In 1817 when Ricardo formulated these ideas much of the produce in the world was agricultural, so comparative advantage had a major affect on what crops should be produced where and what should be traded. In that year 87% of US exports were agricultural products, so clearly the ideas of comparative advantage dominated the discussion of what the US should produce for trade. But, by July 2013 the fraction of agriculture that comprised exports had dropped to 7.9% (2). Production and trade of manufactured goods has come to dominate the trade of the US. By contrast a country like Madagascar still counts agriculture as a major component of trade, where in 2012 it comprised 44.6% of its trade with the EU. (3) Developed countries like the US have little need for guidance in trade by the principle of comparative advantage. Other principles like national sovereignty, self sufficiency, and maintaining the lead in producing high value-added and high tech goods are more important.
Occasionally, the idea of comparative advantage is used erroneously to describe conditions in a nation that prevail but are not themselves tied to that country. This is sometimes done with regard to wages to insist that a country which has lower wages for a particular occupation has a comparative advantage over another country with higher wages in that occupation. A nation may have an advantage in getting some business for some occupation at some point in time. But this is not a condition that is tied to that country permanently or not transferable to another country. If anything, this is an indication of relatively high unemployment in that occupation in the low wage country, which will be remedied over time by rising wages as more work flows in, and increasing emigration as the workers in that occupation move to where they can get better pay for the same work. For instance, if a country has a surplus of engineers who are getting paid less than in another country, the first country may get more business than the second for a while, but eventually the salaries will be bid up to match the second country and engineers from the first will emigrate to countries like the second that pay better. This is the condition today with regards to India and the US. Salaries for engineers are rising in India and many emigrate to the US for better jobs. Of course all of this depends on national policies on trade and immigration, but there is nothing germane about such a compensation imbalance that makes it tied to any one nation.
Comparative advantage is a principle which has relatively little application in developed, high-tech economies. Therefore, arguments based on it are suspect when applied to developed countries.