Foreword and preface are two terms that are mostly considered to be the same simply because both are most times found in the introductory section of most books. However, there are little differences between the two. A foreword is the introductory section of a piece of literature where a lot of inspiring or kind words are written in order to make the readers see why they need to read a particular piece of literature.
It usually comes before preface, and it can take several pages. On the other hand, a preface also makes up the introductory part of a piece of literature, usually before the main body or main text of a book. A preface provides answers to what prompted the writer towards writing the book.
While a foreword is usually written by the author, it can also be written by other people such as celebrities, an expert, a well-known person, usually in the form of recommendations. In contrast, a preface can only be written by the author.