Mail migration is a complicated topic that could support a small chapter by itself. There are four different types of migration into Exchange Online, as well as migration out of it.
A full discussion of migration is outside the scope of this book, because for the most part, by definition, it deals with areas outside of Office 365. We'll briefly touch on the types of migrations, and some of their prerequisites:
Migration to Exchange Online