The following are good habits that you should apply to your InDesign files in order to produce good ePubs. I’ve also noted the reasoning behind each step as it relates to ePub creation.
Set all sections of your book in separate files, including the title and copyright pages. Then, create a book file (File > New > Book) and add your InDesign Files to the book file. When exporting to ePub, the separate InDesign files will each become a separate html file. If you set your book in one InDesign file, then when you export to ePub, your ePub file will only contain one html file and, therefore, all of the sections of the book will run together, with no separation.
Open the first file in your book. Go to File > File Info… and fill in the Document Title and Author fields. The title and author information will be added to the ePub’s metadata in the content.opf file. Without this information in the content.opf file, when viewing your epub, the reader will display “Unknown” instead of the title or author.
Create and apply paragraph and character styles for all variations of formatted text. When exporting to ePub, your styles will become the basis for the stylesheets file in the ePub. If you format all of your text by hand, not using styles, then when exporting to ePub, the stylesheets file will be full of generically named styles, which makes it difficult to make adjustments to your ePub after it’s been created. This also applies to objects and tables, so be sure to use Table and Cell styles as well as Object styles.
Again, in the first file in your book, go to Layout > Table of Contents Styles… and click “New…” Find your chapter title paragraph style, select it, and click “<<Add”. Click “Include Book Documents” at the bottom of the window and click OK. The newly created TOC style will be used to generate the toc.ncx file in the ePub, which displays the navigation table of contents in the e-reader.