What does it take to find the right fit in terms of a publishing house or agent?
Well, who publishes books similar to what you write? Who agents authors similar (but not too similar) to you? Those are the first places you should target. If you're targeting a house that doesn't publish what you write, you're pretty much wasting everyone's time. For instance, when I finish my young adult novel, I won't be sending it to Ellora's Cave or to my editor at Resplendence. Why? They don't publish YA.
I know, I know. It seems super obvious, doesn't it? But the obvious seems to escape many - particularly when said authors are doing blanket submissions. I once had to reject a children's book - submitted to an erotic romance publishing house.
Always read the publishing house's guidelines. Find out what they accept and what they don't. See if there are any specific calls out. Maybe they're looking for holiday stories...or zombies. Sometimes it's easier for a new writer to get into a publishing house if you're submitting a story for a specific project.
After you've done your homework in terms of researching publishing houses or agents, the most important thing you can do is make sure the story you wrote is in the very best shape possible before submitting it. Make sure your story is as error-free as you can possibly make it. The same goes for your synopsis and query letters. I once received a query letter that had seven grammar and spelling errors in the first eleven word sentence. Not. Cool.
Again, I bet all of these things seem really obvious, but you'd be surprised at how often they're overlooked or straight-up ignored.