Economics at its root is about the allocation of scarce resources for the production and sale of goods and services. When economic decisions are made, they are put into action using these resources that exist in a limited setting. The result is that for every economic decision made (and, alternately, for every unit of resource consumed), something else is foregone. The value we assign to the rejected decision, what we give up, is called an opportunity cost. There was an opportunity, a decision was made, and some other outcome was foregone in the process. Economists use this concept to describe the reasons behind economic decision-making and to predict market behavior.
At efficient levels of production, imagine that Country X produces some quantity of guns and some quantity of butter. In order to produce more of one or the other, the economy will have to move resources away from production of one good and toward production of the other. For example, if Country X decides it wants to produce more butter, it will have to move some of its labor and capital toward butter production and away from gun production, reducing the number of guns produced. In other words, in order to produce more butter, Country X must forgo the opportunity to produce some guns. The true net value to society of producing more butter then is not the value of the increased butter output, but the value of the increased butter output less the value of the forgone gun output. This cost is what is referred to as opportunity cost.
For instance, if a hardworking student takes on an 8:00 AM class over the summer, many opportunity costs can be observed. The fact that the class is so early in the morning means that the student each day gives up a couple hours of sleep to get ready and make it to class. If the student values education higher than sleeping in, the early class may have been a good decision, otherwise there will be problems as sleep is lost. Since sleep is surrendered for studies, it is an opportunity cost here.
Further, the student has decided to take class during the summer, when normally the student takes on a job and works to earn money for the following semester. Here the opportunity cost is the amount of money that could have been earned working rather than going to class. Because the student valued the class more than the summer job, the decision turned out this way. Since the class is a summer class, it is longer and each lecture holds more material in a shorter period of time. Again, the student values taking this class over the summer and getting it out of the way more than the benefit of shorter lectures and more time to study by taking the class in the fall. The opportunity cost, then, is the foregone benefit of fall scheduling. In one simple decision, many opportunities were foregone in order to achieve the desired result.
Taking a more monetary look at opportunity costs can help explain why we act the way we do in times of economic decision. If Country X sells guns and butter for the same price, say $500 per unit, but produces guns and butter at different costs, say $100 and $150 respectively, this difference will affect business decisions to come. The value of doing business in guns is $400 per unit, whereas butter is only $350. With no other external consideration, it makes sense that Country X will produce more guns than butter, to maximize its revenue. In fact, if resources permit, Country X should stop producing butter altogether and focus its energies on guns, because it makes $50 more per unit. This is the fundamental concept behind comparative and absolute advantage, linked below.