I get asked this question constantly, and I certainly don't mind answering it, but it isn't a simple response I've got for you.
# 1 - Perseverance
Don't give up. If you really believe in your manuscript, send it out there. You will get rejections most likely. Grow a thick skin. Not everyone is going to gush over you like your mother does. (Yes, I'm speaking from experience).
# 2 - Learn to write a GREAT query letter.
You have a matter of seconds to grab that agent or publisher. If that query letter doesn't get them excited, they aren't going to give you a chance.
# 3 - Research
What agencies / publishers like to work with authors who write the genre of book you have? There are plenty of people who wouldn't have touched Lily Drake with a ten foot pole because it is a vampire romance. Yet, I found a great publisher. (This goes back to #1 - perseverance)
#4 - Formatting
Make sure your manuscript is polished to a sheen, formatted properly and ready to be critiqued, but also (and this is important) make sure that when you submit it, you have formatted the work to the publisher's / agent's specs. If they want 12 point, Times New Roman, 1" margins, etc. - Do it. They don't want to struggle jumping from one manuscript to the next, and they read tons of these daily. Chances are, if they have a problem reading yours, they will delete it no matter how great it is.
#5 - Make Friends
Other authors aren't your competition. People don't just purchase one book per month, year or lifetime. Other authors can offer valuable advice from the beginning stages of finding a publisher to great marketing tips on how to improve sales. Use that resource and gain some cool new peeps in the process.