A comparative advantage in trade is the advantage that one country has over another in the production of a particular good or service. This advantage may come because of a country's infrastructure, labor force, technology or innovations, or natural resources. Using comparative advantage in trade necessitates that countries should put most of their efforts into producing those goods where they possess a comparative advantage. The contrast of this is that countries should attempt to import those goods that represent a comparative disadvantage for them, thereby creating an advantageous situation for all nations engaging in foreign trade.
Trade between nations has always been a large part of the global economy. That's even more the case in modern times, considering the impressive advances in both transportation and communication that technology has afforded. Each country in the world has specific products which they are able to produce at a high rate and a low cost relative to other nations. This fact is what drives the notion of comparative advantage in trade.
As an example of how the comparative advantage in trade manifests itself, imagine two countries that are engaged in the production of automobiles. Country A has been producing automobiles for a long time, and they have implemented various technological advances which allow them to produce the cars at a low cost. By contrast, the automobile industry in Country B is just starting out, and, as a result, neither the labor force nor the raw materials available are conducive for production at a high level.
In this case, it makes sense for Country A to put much of its resources behind the production of automobiles. Country A should also focus on exporting automobiles to countries like Country B that lack the capacity to produce them at great levels. On the other hand, Country B is wasting its efforts trying to produce automobiles at a high level. Instead, the concept of comparative advantage in trade supposes that this country should concentrate on those goods which it is better equipped to produce.
Any country making use of a comparative advantage in trade to export goods should also be prepared to import those goods where it lacks an advantage. Putting money into producing those goods where the advantage lies means taking on the opportunity cost of that extra production. This opportunity cost is worthwhile, since the country in question can generally reap the rewards of the exports it sells to other countries. With this system in place, it is possible for all trading partners to play to their strengths, buffer their weaknesses, and benefit from international trades at all times.