Countries trade much like individuals and businesses trade. When they do not have the resources, or capacity to satisfy their own needs and wants they trade what they have a surplus of for those shortfalls. Just like we do when we work a job, in exchange for money and then in exchange purchase food. We are usually better off specializing in our job and trading money for food then we are if we tried to do our job and grow all our own food. Unless of course your profession was farming. Specialization and trade dates back thousands of years, but it was limited due to the slow, unreliable ways of transporting goods. Think about trading food, without refrigeration and the ability to do so relatively quickly with modern transportation, most food would spoil before it reached its destination. Today, international trade is at the heart of the global economy and is responsible for much of the development and prosperity of the modern industrialized world.
When we have a global market this expands the level of competition. Goods and services are likely to be imported when they are cheaper, or of better quality, or some other differentiating factor.
So how do countries and the businesses within countries decide what they should produce and trade? It boils down to where your opportunity cost is the lowest, you can derive your comparative advantage from these two principles:
Division of labour
Breaking production down into functional tasks and then allocating those tasks to the worker or group of workers that are best equipped to most suitability undertake the task efficiently. When applied on an international level, division of labour means that countries usually produce what they are best equipped to produce, and may contribute only a small parts to finished products sold in global markets. For example, an IPhone's software is produced in the US, the microchip in Taiwan, the cases in China, etc.
Given that each worker, or each producer, or each business is best equipped to produce an outcome, it makes sense that they specialize in that role to enhance and keep their comparative advantage. The more you enhance your advantage by specializing the better off you are because you reduce the risk of competition taking over and the consumers are better off because you become more efficient at your specialization, often lowering the cost of your good or service.
When countries specialize they are likely to become more efficient over time. This is partly because a country's producers will become larger and exploit economies of scale. Faced by large global markets, firms may be encouraged to adopt mass production, and apply new technology. This can provide a country with a price and non-price advantage over less specialized countries, making it increasingly competitive and improving its chances of exporting in the future.
The advantages of trade
Let's look at a simple example of this:
If Iceland specializes in producing Books and Greenland then specializes in making Pillows, they can trade to make it beneficial for each party. Iceland could produce 20 Books and Greenland could produce 80 Pillows. If they both agree that 1 Book is worth 2 pillows and engage in trade this will happen:
As you can see in this example both countries are now better off after trade. The same principle applies all throughout life.
Research what "economies of scale" means and the advantage that is often realized from this. There will be a question on the final exam related to this.