How to use quotes and epigraphs

You’ve probably read a book that has a quote at the start, or maybe each chapter opens with a quote. They’re called epigraphs, and their purpose is to give the reader an idea of the tone or theme the story intends to set. But did that person actually say those words? And were those words the actual words they used?