1. With a work of any length other than a short story or poem, it is in MOST cases best to have an agent. I say most in call caps because I mean yes, yes, yes get an agent.
2. NO! PUBLISHING COMPANIES should NOT charge you a dime. If any money exchanges hands up front it should be them giving you money! Do not, do not, do not, pay a publishing company and think it is a traditional publisher. If you pay up front it is a POD or self publisher. Most of the time PODs and self-published books will NOT make you money, so before you think of going that way, get an agent, and have that agent shop it around for you!
3. The agent should not charge you a dime either! No money. The money flows to YOU! No one else gets money from you for ANY REASON. Even if they say well we only take money for editing, horse hockey!
A good publisher will pay you. You will never pay them! They will take part of your earnings. That is a lot right there. They will take a % of the books sold. If they say they are a traditional publisher and they ask you for any money at all they are a scam, period, no question. Same for agents. They should be buying you lunch. They shouldn't even say something like, hey I forgot my nickels could you loan me a nickel.
Here is what it SHOULD look like (a very short version). You send your book to agents. One of those agents goes, yes we love it. We'll shop it around. A publishers likes it, sits down with you and your agent and comes up with a contract. You know what you will get paid. Then you edit edit edit with people from the publisher. You might edit with your agent before any of this. Either way, the money comes TO YOU. It does not flow away from you. Keep that in mind and you will be okay. DO NOT PAY ON THE PROMISE OF MONEY BACK LATER, it is a scam. DO NOT PAY FOR ANY REASON! If you pay something, you are going with a self publisher. You should know this, understand it, research it, and decide this on your own not behind the lie of a scam. Also, do not pay for copies, that should be in the contract how many copies you get.
Hope this helps.