Stocks of resources available to a community are given. When the community decides to channel its resources in the production of certain commodities, then they have to abandon some other products which the community could have produced with these resources. From the perspective of a society using a resource for any purpose, it means that we want to sacrifice that good. Those resources that encourage their current use, are called the Cost of Opportunity.
In essence, the cost of production of an object is that quantity of other items which we have to sacrifice.
Example : A carpenter, in one day, can make either one table or 2 chairs. The opportunity cost of 1 table = 2 chairs which can be made instead of a table.