I have a question, let say if I buy put options from the brokerage and sell the put options when the stock price is below my strike price. Now in this scenario, do I straight away earn the profit or will I be obligated to buy the share if the put options that I sold to the buyer decided to exercise the contract?
When you buy a put option, you have bought the right (but not the obligation) to sell a specified amount of the underlying at the strike price on/before a specific date. When you sell the put option that you have bought, you are selling that right to another party. If the put option that you are selling is a put option you have bought before, you are "selling to close" (see: sell to close).
When you buy an option (put or call), you are in a long option position. When you sell a option, you are in a short option position. On the options exchange, long and short positions cancel each other, so when you sell an option (i.e. enter in a short position) that you already own (i.e. an existing long position), you are cancelling your long position position. This is "selling to close". Once you sell to close, you will have 0 long positions and 0 short positions (i.e. no rights, and no obligations).
Now in this scenario, do I straight away earn the profit or will I be obligated to buy the share if the put options that I sold to the buyer decided to exercise the contract?
Because you are selling to close in this case, you have no obligations to do anything after you sell your put option to close your position. You will simply get the money on the sale of the put option, with no further obligations.