Comparative advantage is an economic law referring to the ability of any given economic actor to produce goods and services at a lower opportunity cost than other economic actors.
Thus, when a country has a comparative advantage in the production of a good, it means that it can produce this good at a lower opportunity cost than its trading partner. then the country will specialize in the production of this good and trade it for other goods.