As a writer, especially a "new" or "unpublished" writer, it can be hard to determine which agents or publishers are legitimate and which are scams. There are quite a few that, while they may look great, sound great, act great are usually just cons in publishers clothing (or agents clothing, depending on the scam). How to know who's the real deal? Well, there are hundreds of thousands of websites devoted to telling you just that. I'm not going to tell you it's easy. It isn't.
The most reliable source of information on a publisher is, of course, Amazon. If you go to a publishing house's website and they claim credit for, in example, author Mr. Dean Koontz's novel, The Door to December, go to Amazon and search for the book. While some novels will be published by more than one house (Mr. Stephen King's "The Shining" has been published several times by different houses), you will find ALL of them on Amazon. (Good Reads is another good place to search for books a publisher claims to have sold) The good thing about these websites is that they offer all the information you need to know. If you go to Amazon.com and search out "The Door to December" by Dean Koontz, you'll get back results for every publishing house that has it in print. If above said publisher who claims to have sold it is not listed, then THEY DID NOT SELL IT!! I conducted a search on Amazon just so I could report this correctly to you. Koontz's "The Door to December" gets 49 results on Amazon, though not all listings in these results are Koontz's work, most were. Clicking on each one of these results will tell you this book was published by Signet books in 1985 (and other dates), authored by Dean Koontz (AKA Richard Paige), gives information on the product such as an ISBN, paperback, hardback, date published etc. If a publishing house claims books they didn't sell, my advice to you is run away as fast as you can.
If, however, the publishing house is listed for Mr. Koontz's work, you still probably need to look elsewhere. Larger publishing houses won't usually take work from an author with no agent. That doesn't mean small presses won't take it, though. The term "small press" has nothing to do with how reputable a publishing company is. It just means they work on a smaller scale and usually only publishing a few titles a year. This can actually be a good thing.
Some of the other websites you can read and use to your advantage while you are separating the wheat from the chaff are: Preditors and Editors , Writer Beware , The AAR , among many, many others. I AM NOT vouching for all the information found on these sites, but I use them myself, if that tells you anything. As I have yet to publish, that may not mean a whole lot, but there you go.
Now, agents are a different matter altogether. There are literally hundreds of thousands of scam artists, with only a few thousand true agents. Sounds like a lot, doesn't it? It isn't. Imagine a small town. Now imagine a large country. Large country= cons and scam artists, Small town= literary agents. Now which sounds like a lot? The same websites listed above also list agents (Actually, the AAR lists nothing BUT agents) and can be a help no matter what you are seeking. The articles on these sites are informative, they don't ask for money or membership, although it is an option (the membership part, not the money part), and in fact, Writer Beware states very clearly that they DO NOT accept donations. Why would they offer free information such as this? Because too many aspiring authors have been duped by the bad boys that are giving publishing a bad rap. One it doesn't deserve.
If you still want to publish your book after reading the articles on these websites, then go ahead and start looking. There is no time like the present. Procrastination doesn't sell books anymore than I do. What are you waiting for? Go get 'em, tiger.
Oh, and just one more thing; research, research, research. You can never, EVER, do enough research on a person or establishment that you are considering. After all, these people are reading your heartfelt work. Make sure they are worthy, okay? Peace and love, y'all.