International trade is the natural outcome of having comparative advantage.
For example, if Malaysia is able to manufacture electronics at a lower opportunity cost than Singapore, then Malaysia has a comparative advantage in producing this good. On top of this, if Singapore also has a comparative advantage in producing chemicals, then it make sense for both countries to be trading these two products to enjoy greater efficiency.
Comparative advantage naturally leads to Specialisation. If countries solely produce goods which they have a comparative advantage in, while obtaining other goods through trade, both countries will get to enjoy greater volume of consumption (as compared to an autarky setting), as the entire opportunity set of the production possibility frontier increases.
Gains from trade only exist if there are comparative advantages, which technically translates to different gradient of production possibility slope.
Causes of Comparative Advantage
There are two main causes of comparative advantage.
Countries are endowed with different factors of production, resulting in different advantages. The best example is OPEC. Having large oil reserves allows these countries to produce oil at a much lower cost than others.
Developing proprietary technology and technology shifts allow countries to have the advantage at producing certain goods more efficiently than others. This is also an argument to support government funding for the development of technology. But over time such advantage can be eroded, as the technology becomes accessible by other countries.
Benefits of International Trade
Continuing our analysis on the example mentioned, if we observe the domestic market for electronics in Singapore, the import of goods from Malaysia through trade is going to increase supply. As the market moves to the new equilibrium, consumers will enjoy lower price and higher quantity consumed. However, domestic producers will suffer due to the competition. As a whole however, the consumer gain outweigh producer loss, making Singapore society better off.
If we look at the domestic market of chemicals in Singapore, exporting this good causes domestic supply to decrease. As a result, domestic consumers will suffer from a higher price and lower quantity of consumption. Domestic producers will gain from transactions in the international market. Similarly as a whole, Singapore will be better off as the gain made by producers more than offset the loss made by consumers.
Although society benefits, international trade inevitably create losers, which leads to political backlash. We see this in the classic case of minority producers making louder noise than the public majority, lobbying politicians to restrict imports. This typically leads to import tariffs, which helps reduce the loss suffered by domestic producers, but consumers ultimately suffer, from higher prices and lower consumption. Even though the government gain from the tax, society as a whole is worse off. To worsen the situation, other nations may impose tariffs as a retaliation, reducing demand for exports from the source nation.
Free Trade Collaborations
Many countries established free trade agreements with each other to mutually benefit from international trade. However, this is no easy task, due to political backlash from producers as mentioned above, and other implications.
Governments can, in theory, levy a small tax on all goods in a category (all electronics, both domestically produced or imported) and use the tax collected to compensate producers that suffered a loss due to the import. It can be in the form of productivity funds to encourage the producers to upgrade their capabilities. However, this is hard to achieve due to politics.
Another concern is what if comparative advantage comes from exploitation of the population and the environment of the exporting country? Such cases makes it much more difficult for advocates to promote free trade as it is indirectly promoting exploitation. This is also the reason why some trade agreements are tied to improving the working conditions or preserving the environment in producing countries.
Free trade is always beneficial, but fair trade can make the implementation even better.
(Reference: MIT OCW Principles of Microeconomics)