There are many ways to go about getting a book published, and I try to never be judgmental about any of them. They all have good points as well as pitfalls.
Going for the Big House
The traditional route to publishing a book is difficult, often takes years, and 90% of the time, results in a failure to get an agent or a publisher. However, writers should always try it first, just in case they DO have a blockbuster, they DID write a book the market is ready for, and/or they CAN find an agent or editor who believes in it. Sometimes it really does happen very fast, with fewer than 10 queries, and only a few weeks between when you start searching and when you get a contract. Even if you are in a hurry, anxious to get your book out into the world, you should not skip this step.
To get started, go to QueryTracker or AgentQuery and begin searching for agents who are excellent fits for your book. They should already represent books like yours, and you should mention this in your query letter, as well as a brief (one paragraph) summary of your book, and your writing credits or platform. Send your letter to ten of them. If you get nothing but form replies, throw out your old query and start a new one from scratch, then try ten more. If you are not yet sending material, the problem is your letter, not necessarily your book.
Steel yourself for the rejection, but realize that a failure to catch their attention is not personal. They just didn't find your book a fit for their list or saw a need for revisions they didn't have the time to pursue. Query widely, but if you get to 100 queries and they are all dead ends, it is time to pause and decide what to do next.
One choice is to write another book (which will undoubtedly be better.) Or, if you got requests for material but then got rejected, revise your book, probably with the help of writing classes, hiring a paid editor, or at a minimum, joining an excellent critique group. And then submit anew. Authors who want most of all the validation of a publishing house will do this. Authors who want to go for the brass ring of a bestseller will also do this. Many will spend two to five years on this approach.
But sometimes you have to give in. The timing is wrong. The book is too niche. Or it's not up to big-house standards.
So next, if you really truly believe in your book, is to take the publishing of it into your own hands.
Things to consider before self-publishing:
Do you know this is the best book it can be? Take a good hard look at your manuscript and see if it needs work before you put it out into the world. If at all possible, get people who are good writers, and who will provide an honest opinion, to read it.
If it is nonfiction, do you have an expertise in this area and a place to sell it? Is it worth all your time and effort? What do you stand to gain by putting out a book on your own? Are you opening yourself up to legal or ethical issues by doing this without the backing of a publishing company, especially if you are entering the tricky territory of permissions of quoted material, true-life stories, or medical/health/legal advice?
Are you looking to actually make money off this book, or are you primarily doing it to just get a published book in your hands, for your own benefit and to give to family and friends? Do you care that people will know you self-published it?
With all that in mind, there are a few routes you can take:
Easiest and only moderately expensive (but fraught with peril):
Find an author services company (CreateSpace, Booklocker, Xlibris) that will take your manuscript and design the interior with proper fonts and margins, as well as create a cover for you. They will then allow you to order copies at a discount as well as sell it on their site and in online retailers like Amazon.
The setup will cost $800 to $2000 and may include a few copies for yourself. Your book will use their identifying ISBN numbers, so it will be branded as self-published, but it will be out there. The average book like this will sell less than 200 copies and will generally not make your money back. There are always exceptions, but without anyone out there marketing your book, without expertise in publicity and fighting for reviews and giving it widespread exposure, it will most likely go unnoticed by anyone outside your friends and friends-of-friends.
Big, big pitfall here: watch out for contracts that give the rights to your book to the publisher. Even if you do end up with a breakout book, you might be stuck with the company. Please check Preditors and Editors and Writer Beware. Don't sign anything with anybody, even a simple "online agreement" with a checkbox, without going into it knowing who retains rights.
Second big pitfall: watch out for the hardcore vanity presses that require you to buy a lot of copies up front. Print on demand is a better option, because you do not need a garage full of books that were overpriced and will cause you to lose additional money on shipping.
If you go this route, you should have a decent-looking book, which is what you paid your money for. Don't expect a bookstore to carry it, no matter what the web site said. These books are expensive to produce and do not provide the 40-55% discount and return policy required by wholesalers and bookstores. And don't fall into the belief that anyone will buy your book just because you get "exposure to millions of readers." When a site says this, it means that millions of other people like you come to their site to self-publish, so they get a lot of web traffic. It is, however, the wrong sort of traffic for selling your book.
Less easy, but very cheap:
Use a place like Lulu where you design the book yourself and upload the files. You can often do this totally for free, although if you want to be sold on Amazon, you will have to pay for an ISBN and listing fees. ($300 or so). Here there is little monetary risk, you can sell a few copies and still make money, and if you get your own ISBN instead of buying theirs (CreateSpace lets you do this too), you can avoid an obvious mark of the self publisher.
However, the risk is high, unless you have excellent skills or hire your own designer, that your book will look terrible, be substandard, and even regular readers will recognize this as a self-published title. Some writers are tone-deaf to standards of good-looking clean covers, and proper font and spacing and margins for a book that is easy on the eye. But if you are willing to research, to read and read and read about how to format your book, and can keep your cover very simple, this can work. Lulu has a very author-friendly contract and you can always pull your book and sell it later, as the rights are yours. Again, bookstores are not going to carry this no matter what the publishing company says. They can make it "available," but unless you personally go into an individual bookstore and champion it, it will not get ordered.
Popping up these days are book packagers that also work as though they are traditional publishers. Greenleaf Book Group is an example of this. They have distribution, publish offset runs with enough profit room to provide trade discounts and get into bookstores, take out ads and buy bookstore space, but you the author puts up the initial funds to get the book edited, designed, and the first copies made. It's a very expensive option (if $10,000 scares you, back away slowly), does not always avoid the mark of self-publishing, but stands you a pretty good chance of making money. Most hybrids won't take just any book, but will weed out the ones least likely to succeed.
Hard, but can begin your new career
Start your own small press. If you have several books you want to publish, if you really want to do a good job, especially if you have a tie in with the book and your profession, then file the company paperwork, buy a block of ISBNs, and get an account with Lightning Source or find a printer to publish a couple thousand copies of the book. This is not to be taken lightly. You are literally taking on another life pursuit, but it gives you total control of your publishing fate and if done properly, avoids the self-published label. (Don't call the company your own name and, when possible, find titles other than yours to add to your line up.)
I plan to expand on all these topics, the last one being the overall subject of this blog, but this is a good start, an overview of the options. I hope it helps.