In economic theory, a country has a comparative advantage over another in the production of a good if it can produce it at a lower opportunity cost. That means it has to give up less labor and resources in other goods in order to produce it.
Source: GreenFacts
According to the principle of comparative advantage, the gains from trade follow from allowing an economy to specialise. If a country is relatively better at making wine than wool, it makes sense to put more resources into wine, and to export some of the wine to pay for imports of wool. This is even true if that country is the world's best wool producer, since the country will have more of both wool and wine than it would have without trade. A country does not have to be best at anything to gain from trade. The gains follow from specializing in those activities which, at world prices, the country is relatively better at, even though it may not have an absolute advantage in them.
Source: World Trade Organization Comparative
advantage
Español: Ventaja comparativa