What is a flat file and how does it work?

What is a flat file and how does it work?