Yes, as soon as the option is sold on the open market to a buyer, the seller immediately receives and retains the option's premium. This premium is kept regardless of the action of the market or the buyer. In the event the option expires worthless, the premium becomes profit for the seller, or in contrast, the premium can be used to help offset loss if the seller decides to close the position and buy back the option.
It is important to note, however, that the premium received remains in escrow and cannot be used in any capacity until the risk taken on by the trade is eliminated in due course by either the expiration of the option, or the buy back of the position.