In terms of how the market maker is involved:
https://www.projectfinance.com/options-market-maker/
hedging:
https://www.projectfinance.com/what-is-delta-hedging/
Selling options, on the other hand...