Preface vs. Foreward vs. Prologue

I started reading Buzz Bissinger’s book 3 Nights In August at lunch today and I noticed that the book has a preface, a foreword, and a prologue. I’ve seen this on one or two occasions in the past, but today it made me wonder two things:

1. What is the difference between a preface and a forward and a prologue? What function does each serve?
2. Which one should come first? (Pre means “before” and Fore means “in front” and Pro means “before” or “above”. What gives?