The link between these two concepts is that the existence of scarcity causes opportunity costs to exist. If there were no scarcity, there would be no opportunity costs.
Scarcity means that there are not enough resources to fulfill all of our wants. We never have enough money or time (or other resources) to completely satisfy ourselves. This is the most basic fact of economics.
Opportunity costs are the values of the things we forego when we make choices. For example, if I choose to use my money (and time) to go on a vacation to Hawaii, I cannot also use that same money and time to go on a vacation to Disneyworld. The loss of the vacation to Disneyworld is my opportunity cost for going to Hawaii. My time and my money are limited, so I must make choices and every choice has an opportunity cost.
These choices are only necessary because of scarcity. If I had all the time and money I wanted, I would not have any real opportunity costs because I would never really have to forego anything. So, opportunity costs exist because scarcity exists. This is the link between them.