You can continue to use your account for qualified out-of-pocket medical expenses. Funds can also be used to pay for deductibles, co-pays and coinsurance after you are enrolled in Medicare.
The purchase of a Medicare supplemental insurance policy is not considered a qualified expense.
After you turn 65, you are allowed to use the money in your HSA for non-medical expenses. If you choose to do so, the amount withdrawn will be treated as income. It is subject to income tax but not to penalties.