Imagine you had to produce all the goods you wanted to use yourself with no help or raw materials from others. Everyday would be a fight for survival as you tried to find enough food to eat. Your clothing, if any, would be simple animal skins. Any tools would be made of stone and sticks. Your standard of living would be horrible, even in comparison to those living in the poorest nations. Your life expectancy would be a couple of years at most, as any time you were sick, there would be no one to help you, and surviving harsh weather would be difficult. The smallest group size of humans that can reliably survive without outside help is tribes of around 150 and even they have to struggle for survival. Compare that to modern life. Our clothes are made by others, our houses are built by others, all the tools we use are made by complete strangers, etc. Nearly everything we need to survive is provided by people we will never meet and have no reason to do us any big favors, and yet they still work hard providing the things we need to survive and thrive. How is this possible?
The answer is simple, and it has powerful implications: comparative advantage. If one person can produce something lower opportunity cost than someone else, then they can trade and make everyone better off. What is important is being relatively better at making one particular good, not absolutely better at all production. Suppose that Bill Gates were a really fast typist. He could type 100 wpm. Would it make sense for him to be a secretary? No, because his opportunity cost of that profession would be giving up an extremely lucrative career as a manager. Likewise, a sports star would have to give up millions of dollars to do anything but concentrate on their comparative advantage. Why does China export manufactured goods to the U.S., even though their manufacturing productivity is far lower? An American manufacturing worker could crank out far more cheap goods than a Chinese worker, however, they would have to give up producing a higher value worth of more advanced goods, and so the opportunity cost is too high for it to be worth making cheap simple goods. Likewise, the Chinese worker can focus on what they are relatively good at - mass production - and trade for more complex goods and services from America. Does it make sense for an Idaho potato farmer to make his own car? No, of course not. He can grow potatoes and trade those potatoes for a car. One way to think about trade is as a production technology. Instead of producing a good, people can produce other things that they are good at making (highest value for the effort/resources) and trade for things they are not good at. I can "make" my car, food I need, etc by producing actuarial services and trading them for money and then trading the money for goods.
One major component of comparative advantage is specialization. Adam Smith noted that even given raw materials, a single worker would be able to produce, at most, a few pins every day. Yet, if the pin maker could combine his efforts with others - one to draw out the wire, another to cut it, another to sharpen it, another to bend the wire, etc. By cooperating, people are able to focus on a smaller skill set and get better at doing those specialized things. Specialization is limited by the extent of the market. The pieces that a task can be broken up into are limited by the number of people working together. Additionally, the more people working together, the more specialized goods they are able to produce. It would not make sense to set up a pin factory in a small town. You could make the pins everyone needed in a day or two and after that all the workers would need to find new employment. For a pin factory to be worthwhile, you'd need to be able to sell pins all over a country. The larger the area people trade in, the more competition the firms have. A pin factory that catered to a few towns would likely have a monopoly, since they could out-price any individual pin makers. However, in a large country, many pin factories would have room to operate and compete, leading to better prices and service for consumers. In America, before the entry of the German and Japanese car makers, the "Big Three" set up a cartel that led to poor quality and low innovation. As more and more cars were imported, American firms had to compete harder to survive. Even in industries with large economies of scale, trading across the globe can produce significant competition. The level of specialization in a modern times is staggering.
No one can make a pencil. It takes hundreds of thousands of people working together to make one - lumberjacks, paint makers, miners for the bevel, chemists to figure out how to make a good eraser, etc. By the time you get to really complicated production, such as computers and cars, it takes literally millions of people cooperating (
peacefully) across the globe to make a finished product. Each person must develop their comparative advantage to maximize their gain - even if they are not the best in the world at something, everyone can gain by trading.