Every human being has different innate abilities, different interests, develops different talents, and every unit of land offers different natural resources and environmental circumstances. This naturally leads to a state of affairs where, even if the supply of factors or production was even across the globe, different workers can provide different quantities of the same labor within the same amount of time.
Comparative advantage means an ability of one person to produce more units of one good x versus another good y than another person can produce units of good x versus good y.
Example: Worker A can produce 2 units of good x and 2 units of good y, both within 1 hour. Worker B can produce 2 units of good x and 3 units of good y within the same time. If each of them produces for himself for 2 hrs, spending 1 hr on each good they both enjoy the following quantity of goods:
A: 2 units x, 2 units y
B: 2 units x, 3 units y
The overall supply produced is 4 units of x and 5 units of y.
If, however, each of them spends 2 hrs focusing on producing the good he has a comparative advantage in, the following situation arises: A spends 2 hrs on producing good x, B spends 2 hrs on producing good y, which yields the following quantities:
A: 4 units x
B: 6 units y
The overall supply produced is 4 units of x and 6 units of y.
The specialization has led to a higher supply of goods. A possible scenario that could emerge from here is that B trades 2.5 units of y for 2 units of x. After this trade A would own 2 units of x and 2.5 units of y. B would own 2 units of x and 3.5 units of y.
This shows that both workers are better off when each of them focuses on producing what he has a comparative advantage in. It can be infinitely extended to account for 3, 4, or more different goods and workers. It can furthermore easily be extended to the actions performed by different entrepreneurs competing on the market.
The law of comparative advantage has irrefutably proven that all humans benefit from becoming a participant in the market under division of labor, those who are more productive and those who are less productive alike.