How does a flexible spending account work?

Depends. They are all set up a bit differently but basically you pay or are given a card like a credit card that pays for predetermined medical expenses. The government has a list of.