How does a thermal flow meter work?

How does a thermal flow meter work?