Setting aside, that it's not pure riskless arbitrage, but rather statistical arbitrage:
You can extract the profit by performing continuous delta hedging. If you constantly adjust your hedge position you gain/lose money by delta hedging.
Being long option (gamma long), you sell at higher prices and buy at lower ones. Over the course of time you realize profit. If the option ends up in the money, your hedge would still be an open position, but it will then be fully covered by option exercise.
With short position its the otherwise, you buy high and sell low.
In the end, you hope that your hedging lost/gained less/more money than you sold/bought the option for.
In practice you watch you portolio and its greeks daily and can see whether you are winning or losing. Let's assume you adjust the delta hedge at the end of the every day. I'm denoting market move as $\delta S$. The value of your option at the end of the day can be approximated as:
$$
O(t+1,S+\delta S) \approx O(t,S) + \Delta\,\delta S + \frac{1}{2} \gamma (\delta S)^2 + \theta
$$
So, if the volume of your hedge at the beginning of the day was exactly $-\Delta$, the $\Delta \delta S$ change of the value is compensated and you are left with
$$
P(t+1,S+\delta S) \approx P(t,S) + \frac{1}{2} \gamma (\delta S)^2 + \theta
$$
(now $P$ stands for the value of the whole portfolio of option + hedge)
The $\theta$ term is completely deterministic. You are guaranteed to lose/gain some value every day while being long/short the option. The term with $\gamma$ depends on your luck. Notice, that the $(\delta S)^2$ term is always positive. So the whole term has the same sign as gamma.
So, if you are e.g. gamma positive (and your theta is negative), you are losing theta term every day, and gaining gamma term depending on the market move. If the market moves will turn out to be generally higher on average, the gamma term will earn more over time than the theta terms will lose. But you can see the luck factor in there. The bigger the difference between real and implied volatility there is, the less luck is needed.
If the option is priced fair, the gamma term will be equal to theta term on average:
$$
\rm{E}\biggl(\frac{1}{2} \gamma (\delta S)^2\biggr) = -\theta
$$