You'll lose that money if you leave your job unless you choose COBRA continuing coverage. Your employer may allow you to carry over unused funds in an HRA and use the money in subsequent years, but it's not required. Your employer can set the rules for what care you can pay for using HRA funds.
Health savings accounts (HSAs), on the other hand, allow both you and your employer to contribute money. However, you are eligible to contribute to an HSA only if you have a qualifying high-deductible health plan (HDHP). Your employer may offer an HDHP with an HSA as a workplace benefit. Or, if you sign up for individual health insurance coverage and choose an HDHP, you can open an HSA with a brokerage firm or other financial institution.
Taxes
With an HRA, your employer reaps the tax benefits since the company is the party making the contribution. With an HSA, you reap the tax benefits. You can leave your HSA money invested from year to year, and it will grow tax-free if you don't take it out to pay for healthcare expenses. Also, the HSA is yours to keep even if you leave your job. However, if you withdraw funds for anything other than healthcare costs and you're younger than 65, you'll pay a 20% tax penalty on the money.