The basics of economics were described earlier. This page describes many aspects related to trade. As usual, these are best understood in relation to the default state of Subsistence, where each person lives on ten fish a day.
To survive, each person needs five red fish and five blue fish a day. Each person catches five red fish and five blue fish a day.
The red fish live in one lagoon, and the blue fish in another lagoon. So 50 people catch 500 red fish a day in the first lagoon, and the other 50 people catch 500 blue fish a day in the second lagoon, then they meet and trade the fish. Each person who caught 10 red fish gives 5 red fish and receives 5 blue fish in exchange; and vice versa. That constitutes the exchange rate for the fish.
The red fish are easier to spot in the water, so that one person can catch 20 red fish a day. However, the blue fish are difficult to spot, so that one person can catch only 6.7 blue fish a day. Catching a blue fish takes three times as much time as catching a red fish. Hence a blue fish is three times as valuable as a red fish. In general, the value of something is equivalent to the length of time required to acquire it.
If 50 people catch each kind of fish, then they would get 1000 red fish and 333 blue fish a day. The people who catch blue fish can demand several of the plentiful red fish for each scarce blue fish. This incentivizes more people to catch blue fish, rather than red fish.
Say that 25 more people switch to catching blue fish. So 75 people in all catch blue fish, for a total of 75 x 6.7 = 500 blue fish a day. The remaining 25 people catch red fish, also for a total of 25 x 20 = 500 red fish a day. So the two groups can then trade the fish.
The simplest way to understand the trade is to consider 3 three blue-fishers trading with one red-fisher. The three blue-fishers have a total of 3 x 6.7 = 20 blue fish. The red-fisher has 20 red fish. So, in aggregate, the four of the fishers have 20 blue fish and 20 red fish, or 5 of each per person.
From that starting state, the red-fisher keeps 5 red fish, and gives the remaining 15 to the 3 blue-fishers, 5 red fish for each. In return, each blue-fisher keeps 5 blue fish and gives 1.7 blue fish to the red-fisher, for a total of 3 x 1.7 = 5 blue fish.
In this case, 5 red fish are traded for 1.7 blue fish, yielding the exchange rate of 3 red fish for each blue fish. The exchange rate automatically reflects the value of the goods being traded. The resultant price serves as an indicator of the relative scarcity or value of each good. The supply and demand adjusts automatically based on the price. This is the primary benefit of the price of some item being determined by the supply and demand. E.g., a high price incentivizes more people to supply the item, and fewer people to consume the item.
The red fish become a little more difficult to catch, so the 75 red-fishers catch only 450 red fish a day. At the same time, blue fish become a little easier to catch, so the 25 blue-fishers catch 550 blue fish a day. The red-fishers have fewer red fish, so they are no longer willing to give 3 red fish for each blue fish. Similarly, the blue-fishers have more blue fish, so they are willing to give a blue fish for fewer than three red fish. This incentivizes some blue-fishers to switch to catching red fish instead. Then the group can again catch a total of 500 red fish and 500 blue fish a day, and the exchange rate automatically adjusts to the new situation, maybe 2.5 red fish for each blue fish.
100 people live on the island Redinia, which has many red fish but few blue fish. Another 100 people live on another island, Bluinia, which has many blue fish but few red fish. So the residents of Redinia catch many red fish, the residents of Bluinia catch many blue fish, then they trade the fish at a mutually acceptable rate.
This arrangement benefits the residents of both islands. Redinia benefits from importing blue fish, and is willing to catch more of the plentiful red fish to export as payment. Bluinia benefits from importing red fish, and is willing to catch more of the plentiful blue fish to export as payment.
In both cases, the benefit is from the fish that are imported, and the exports constitute the payment for that benefit. When buying fish from a fish store, you naturally want the most fish for the least payment. In the same way, imports are the goods received, and should be maximized; while exports are the payment, and should be minimized. Of course, the other country is trying to do the same, with the goods reversed! Redinia wants to import many blue fish at the cost of exporting a few red fish; while Bluinia wants to import many red fish at the cost of exporting a few blue fish.
The government of Redinia decides to pursue a misguided mercantilist approach to the trade with Bluinia. Redinia restricts the import of blue fish from Bluinia by imposing tariffs and/or enforcing trade treaties. Simultaneously, Redinia encourages the export of red fish. The people of Redinia suffer from the shortage of both the blue fish and the red fish.
The government of Bluinia, by contrast, does not impose any tariffs. It institutes treaties that allow trade, or, ideally, permits free trade, without any treaties needed. Its fishers freely trade, both among themselves, and with fishers in other islands, to mutual benefit. The fishers in Bluinia happily import red fish from Redinia at the low prices subsidized by the government of Redinia. The fishers in Bluinia also freely trade with the other island Redalia that has a similar liberal approach to trade. Bluinia and Redalia prosper, while the people of Redinia suffer from being prevented from engaging in mutually beneficial trade.