Assuming it's done and you've gotten feedback and critiques that you've used to make your book better, you now need to make sure your book is in a position to be published instantly, meaning very few grammar, punctuation, and spelling errors. Your facts should be checked and confirmed through research of your own. These are things you, as the writer, do and not your literary agent. I've heard of literary agents turning down manuscripts because of too many English errors - it's a sign of weak writing. If you're manuscript is in tip-top shape and is well written and interesting, as well as original and marketable then you might be able to find a literary agent or publisher.
An agent will try to sell your book to publishers on your behalf. They know how much your book is worth on the market and will try to negotiate the best deal for you. They also have connections that you don't have; they have access to large publishers (ie: Random House) and can submit your manuscript to them. All large publishers and many smaller ones only accept manuscripts from agents, so if you don't go through an agent then you have no chance of being published by a large publishing house. Agents make their money when they sell your book - they get about 15% commission on the sale and any royalties thereafter. Legitimate agents never charge any upfront fees and you should never have to pay out of pocket to get your book published. Agents will take their commission when the publisher sends them the check, and then the agent sends you the rest.
If you decide to forgo an agent then you can pitch your book directly to publishers; they'll be small publishers who won't have the money to effectively market your book or pay you a high advance. There are many types of publishers and you want to avoid vanity publishers like Publish America (PA). Vanity publishers like PA may or may not charge you to print your book, but PA is looked down upon by many reputable authors because PA makes it's profits from the author buying their own over-priced books. PA also doesn't do much of any marketing and sales on behalf of their clients and this is why the authors end up buying their own books so they can sell them themselves - a sign of a vanity publisher if when you find that you have to buy your own books from them. Your book most likely will not appear in major bookstores, either, because they don't stock POD (print on demand) books. The only people who will actually buy and read your book are you and your family and friends. Beware of many vanity and self-publishers posing as traditional publishers.
Traditional publishers like Random House, which is the largest publishing house in the industry, will never charge you anything to print your book because they pay you. They handle everything regarding your book, including cover design, editing, fact checking, etc, because their reputation is on the line to only publish quality books. Now, don't get me wrong; if your book has a lot of errors to begin with then no publisher is going to touch it. Also, keep in mind that if you get an agent then the agent will suggest changes to your book. They might suggest that you remove certain characters, change your ending, give another character more of the plot, etc. And, if you find a publisher then the publisher will suggest even more changes, so my advice is to not get too attached to your characters and plotlines because they might not be included in the final product. Of course, you can refuse to make these changes, but that wouldn't be wise since you want your book to be published...Also, over 90% of the time the publisher will change the title of your book.
Beware of the many literary and publishing scams. If an agent wants you to pay out of pocket for whatever reason then that's a sign that they're a scam who has no intention of selling your book. If an agent recommends you pay for services from another company then this is also a sign of a scam because most likely the agent is getting a kickback for all referrals, and, at it's worse, the agent owns this "other business" and doesn't tell you. Many people get scammed this way and they end up being out of hundreds of dollars and still won't have their book published. You need to do a lot of research to recognize the scammers and never, ever be desperate to the point that you pay to be represented by an agent or have your book published. You should never pay anything out of pocket during this whole process.