If I buy a PUT without owning any shares in the underlying stock, what happens if it expires in-the-money? The seller will be required to buy the shares, but whose shares?
If an option is one cent or more ITM at expiration, the OCC will automatically exercise it whether long or short. This is called Exercise by Exception. For equity options, you'll end up with a position in the underlying (long ro short). If you are long the option, you can designate to your broker that your options not be exercised at expiration. This would make sense if ITM by pennies and your commission to close exceeds the premium available.
In your situation, your long put would be exercised. The shares would be borrowed on your behalf by your broker, the proceeds for the sale of the shares would be credited to your account, and you'd end up with a short position in the stock. There might be complications if the shares were not available to borrow but let's keep it simple for now.
You bought the put. You are required to buy the shares if you hold it until expiration. Your position at expiration becomes a short. This would only happen if the shares close below the strike price, so you are also given enough money to buy the shares and have money, your profit, left over.