While this question is basic, I am answering because putting models and/or formulae into practice is a part of quant finance that is not covered extensively on this (or any other) SE.
(The below will be from the perspective of a listed equity)
In practice, when/if you find options that are not trading in parity with their underlying the first thing you should do is check for corporate actions. 99.9% percent of the time, that is the root of the "mispricing" -- which is not actually a mispricing at all.
If you get past that, then it would be time to execute the trade and get that arbitrage into you or your firm's account before it disappears. To do this you could execute a conversion, a reversal or a box spread to lock in the profit. There are a few other ways but I am keeping this simple. Any of those three methods executes both sides of the equation in one transaction.
Presumably, you already have an account with capital in it so you don't need to worry about selling a bond for financing purposes because your margin agreement with your broker already allows you to borrow capital at will. You do, however, need to know what you will be paying for the trade. By that, I mean how much of your accounts capital will be held in margin and therefore cannot be used for other opportunities (opportunity cost) and also what rate you will be paying for the funds you have borrowed (usually LIBOR + [some amount of basis points]).
SPY at $238.75
SPY 170505C238 @ $1.00
SPY 170505P238 @ $0.25
Margin cost for 1 day = $-0.01
238.75 - 1.00 + 0.25 + 0.01 = 238.01
The above example uses a conversion (long stock - short call + long put) to execute both sides at once. The conversion price higher than the strike by 0.01. In the real world, this is parity. At first glance, you may think that you can reverse the trade and capture the 0.01 using a reversal but you can't. I'll let you figure that out.
Most times you will find that adding the cost of capital into your equation makes the arbitrage disappear. These types of trades were much easier to find and execute 15 years ago. Nowadays, if they exist for more than 1 second that is a long time.