Uh, it seems there are a lot of different opinions floating around as to how to do this, which is fine. It's all about what works.
Both Amazon and Smashwords recommend loading Word documents, in Smashwords' case a doc instead of docx or rtf. But you won't use the same file. That would be way too easy for real life.
The Smashwords free ebook on how to format is truly excellent. I have to look it up every time I need to make a linked table of contents.
One of the main blarts you need to avoid is using the tab key, if you're old enough to have learned on a typewriter. If your manuscript is already full of tabs, the Smashwords book can tell you one of the easiest ways to fix this.
Createspace has templates you can use for each size of book they offer. That's the main difference between ebook and print. Ebook is fluid. Slip in a section break between chapters or short stories, and you're good to go. I do this as I draft now.
The createspace templates are the way to go for me, and they're in Word. The nice representative on the other end of the phone actually told me they prefer Word docs. I don't see any reason to go loading epubs and mobis if you don't have to mess with them. But I'm mildly tech-averse. I'll usually take the least intimidating path in this area.
A print book, unlike an ebook, has set pages, with page numbers and headings. I can now do the headings almost without thought, but I had many days of tooth-grinding frustration to get there. Be sure to center the page numbers on the bottom, like in the template. I'm telling you this as a friend. It's not worth the frustration of trying to put the page number on the top outside margin, which is a different side for odd and even pages.
The good news is that it's way easier to get a hold of a createspace tech on the phone than a KDP representative. Just a heads up, when I recently replaced my createspace file, I had to use Mozilla Firefox. That's apparently their preferred browser, so if you don't use it (I usually use Chrome), you might need to download Firefox to transfer your files.