Short answer: multiple-step and time-consuming/expensive
Google eBook formatting and see the hundreds of different methods for doing this. It ranges from long, in-depth methods that would require you to strip your book down to plain text and add semantic information, to supposed 'converters' that will do it all for you.
There are 'professionals' who will, for a price, convert your book manually to the different formats, and give it love and attention.
Frankly speaking, I've never read a single eBook that was one-hundred-percent formatted right - there will always be some odd glitch or quirk. Some eBooks range from bare-bones formatting that barely looks better than a
.txt file, through to fancily done ones that are obviously professional (Hunger Games comes to mind as a really well-done eBook).
Speaking from a programming side, there are so many different devices out there - smartphones, Kindles, iPads/tablets etc, and so many different book formats that getting something to look 100% right on 100% of devices isn't going to be possible.
You will need to research what's right for you - are you going to individually create five or six different forms of your book, or would you rather pay and have it done? Personally, (again, speaking from my programmer side), never trust any automatic convertor to do things right.
Edit: Also, see this post on eBook formatting, it has some useful links and answers.