I did some research and it turns out that you can invest funds that you have in your Health Savings Account in certain things. If I invest $5,000 from my HSA into a Mutual Fund (which is acceptable) are the distributions required to go back into the HSA? What about any gain? I can't seem to figure out if this is a tax free way to get some gains or not.
If you invest inside an HSA, it is very similar to investing inside an IRA. Any distributions stay in the HSA. If you sell an investment, the proceeds stay in the HSA. The only way you get any money out of an HSA without penalty before age 65 is to pay for qualified medical expenses.
If you still have money in there at age 65, you can withdraw it without a qualified medical expense, but you have to pay tax on the distributions (just like with a traditional IRA).
So, an HSA gives you tax-free gains if you spend it on qualified medical expenses, and tax-deferred gains if you withdraw it after age 65 without a qualified medical expense.
IRS Publication 969 has more details.