You can withdraw money from your HSA for qualified medical expenses for yourself, your spouse, and your dependents. Distributions from an HSA for qualified medical expenses are not taxable. However, distributions from an HSA to pay for nonqualified expenses are considered taxable income and are subject to an additional tax of 20%. The 20% additional tax for nonqualified expenses does not apply if the distribution is made as a result of death or disability or upon reaching age 65, the age of Medicare eligibility.
Even after you are no longer an eligible individual (e.g., you are enrolled in Medicare benefits or you no longer have a HDHP), distributions that you use to pay for qualified medical expenses continue to be tax-free.
If you are married and both you and your spouse have an HSA, you or your spouse may use HSA distributions to pay for the qualified medical expenses of the other spouse, but both HSAs cannot reimburse for the same expenses.