Collar strategy for options trading I am new to investing on the market so I am doing some research and studying. From what I can tell, the purpose of a collar strategy for options trading is to protect your gains you've made on the underlying stock.

If you want to protect your gains, why would you not simply buy an OTM put?

Is the purpose of writing a covered call in a collar strategy to offset the premium cost of the put?

Edit: To clarify, why would you write a call to possibly cap your gain and lose your shares if your goal is to protect from loss?
A collar strategy is only in part to protect your gains made on the underlying stock. The collar strategy consists of buying protective puts and at the same time writing covered calls.

You are right in saying "If you want to protect your gains, why would you not simply buy an OTM put?". This is known as the Protective Put and if you simply want to protect your gains, this is the way to do it.

When you also write a covered call, you once again got it right that it is usually used to offset the premium costs of the put. 

However when you combine the two strategies (creating an equity collar), your view of the market would be that it is moving sideways. I.E. you are expecting the asset prices to not rise above your written call's strike price, and you are protecting your asset prices in case it falls below your put's strike price. And in the meantime, you are still holding on to the asset earning dividends while the covered call is financing the protective put.

On a side note, this question seems to be more in tune with the Quantitative Finance Stack Exchange community.