There are two main reasons why individuals (or countries) can benefit from trade:
Let's assume that individuals rank consumption baskets in a manner that their ranking can be expressed by a (individual specific) utility function. In ECON 410 you will learn how a utility function is "extracted" from an individual's preferences, but here we are taking it as a given.
Definition: The marginal utility of an agent for a given good at the current consumption basket is by how much his/her utility increases if we increase the consumption of the good by one unit.
Two-agent (Crusoe and Friday), two-good (fish and coconuts) economy. Assume that marginal utilities are constant for both agents.
$M^C_f = 50$ — Crusoe's marginal utility for fish.
$M^C_c = 20$ — Crusoe's marginal utility for coconuts.
$M^F_f = 4$ — Friday's marginal utility for fish.
$M^F_c = 3$ — Friday's marginal utility for coconuts.
Claim: The maximum amount of coconuts that Crusoe is willing to give up in exchange for receiving an additional fish is $2.5$, while the maximum amount of coconuts that Friday is willing to give up in exchange for receiving an additional fish is $1.\overline{33}$.
The ratio of marginal utilities is the individual's exchange rate for the goods.
"Efficient" means that if the economy is at the PPF: to increase production of one good, the production of some other good must be decreased (i.e., there are trade-offs; the opportunity cost of increasing production of any good is positive).
Assuming that marginal products are decreasing: At the frontier, the ratio of marginal products with respect to any two inputs must be equal across all goods being produced:
If $\tfrac{M_{\kappa}\text{Fish}}{M_{\ell}\text{Fish}} \gt \tfrac{M_{\kappa}\text{Coconut}}{M_{\ell}\text{Coconut}}$, we should use more capital and less labor in the production of fish. This also implies we should use less capital and more labor in the production of coconuts.
When the marginal rate of transformation is different across countries, there are comparative advantages, and both countries can mutually benefit from trade.