-You must have high deductible health plan to be eligible. HSA-eligible HDHPs are required to have an annual out-of pocket maximum of no more than $6,750 for single coverage and $15,800 for family coverage in 2019. (That figure rises to $6,900/$13,800 for singles/families in 2020.) Minimum deductibles are $1,350 ($1,400 in 2020) for singles and $2,700 for families ($2,800 in 2020).
-Pre-tax dollars go in, investment gains are not taxed, and withdrawals are not taxed as long as they are for eligible medical expenses. The cool part is you don't HAVE to pay medical expenses with your HSA money immediately, you can do it retroactively (going as far back as you had an HSA). I have 6 years worth of medical receipts I can pull out now, or in 20 years, with no fees, taxes, or penalties.
-When you hit 65 and are on medicare instead of an HDHP, you can still use the HSA for medical expenses, including supplemental insurance premiums and nursing home costs, without taxes, fees, or penalties. I anticipate that my HSA money will NEVER be taxed! Not going in, not while growing(with some niobf) shares), nor upon withdrawal. Worst case, if you use money after 65 for non-medical expenses it is taxed as 401k money would be, no penalties.
I use my HSA as an emergency fund since I can pull out those medical expenses at any time, and as a retirement account. My wife and I can certainly count have high medical expenses at some point!