Opportunity cost refers to what you're giving up by taking your first choice, rather than your second choice. In this case, the opportunity cost of pursuing a PhD is time you would otherwise have spent in the workforce, as well as the monetary costs of actually obtaining the PhD.
Let's take a practical example. Suppose you earn your master's degree at age 26 and have the choice of going into industry immediately or spending another four years working on your PhD at a cost of $20,000 per year. Afterwards, you will work until age 65.
Industry salary: $67,000 x 39 years = $2,613,000
PhD salary: $73,000 x 35 years = $2,555,000
The extra four years result in almost a $60,000 difference! But it gets worse...we still need to subtract the $80,000 you spent on the PhD (tuition, fees, books..although you can cancel out much of that by working as a TA). Now the you who went into industry is nearly $140,000 ahead. But wait, we're not done yet - he also had 4 years more experience, so he'll have gotten his first raise when you're just starting, tilting things in his favor even more.