Formatting an e-Book can be a lot of work, depending on how many different formats you want to produce.
The biggest issue with different e-Readers is the compatibly with e-Book formats. For example Kindles are usually only able to display Mobi files, while other e-Reader brands mostly don’t support Mobi files. Most e-Readers should however be compatible with ePub files. Therefore, you can for example decide to produce Mobi and ePub files to make sure a potential reader can download a file compatible with their e-Reader.
Depending on how you decide to distribute your e-Book, the online distributer (such as Smashwords) may have an online function to format your book. Others (for examples CreateSpace and Lulu) offer instructions on formatting. When you are using one of those online distributors, you need to keep in mind that they may have a style sheet or certain formatting requirements.
Free software to format your E-Book you can use is Calibre, which allows you to convert e-Books (also from Word docs to e-Books) and format e-Books directly.