A preface, which is included in the front matter of a book, is your chance to speak directly to your readers about why you wrote the book, what it's about, and why it's important. Many books don't require one, especially works of fiction, but if you're wondering how to write a preface, here's an overview.
Does a book need a preface?
When you're writing your book, you might want to add a bit of context for the reader or provide information to help them understand the significance of the story. If your book needs an expository section to support your story and explain why you wrote it, you need a preface.
Is the preface important?
The preface gives you, as the author, the opportunity to introduce yourself to your readers and explain to them why they should hear what you have to say. This is where you build credibility, so you should give some insight into how you got to be an expert on your subject. You can toot your own horn a bit here.