Make sure your writing is superb. Don't bother agents with manuscripts that are littered with typos or worse. Have a friend or associate who is good with grammar (but doesn't consider themselves a writer) help you revise your manuscript. Print the manuscript out on a heavyweight paper and box it for your first shipment to protect it.
Find five or 10 books that are similar in writing style and topic to yours. Look at the acknowledgements in each book. Most authors acknowledge their agents. Take down the names of the agents and then do a search for them online. Most agents have websites now and some will take query letters or full submissions online.
Purchase or borrow a copy of the Writer's Digest Guide to Literary Agents. It doesn't have to be the most recent copy, since most good agents will have been in a business for a number of years. Look up the agents you wish to send your query to and make sure their guidelines match up with the type of manuscript you are going to send.
Look at the agent's credentials. Before deciding on agents, look at the authors they work with (a Google search will usually bring up some names if they aren't listed on the agent's website), and see if they are a member of the Association of Author's Representatives. If an agent charges anything, then they are not a good agent. Real agents get paid when you do.
Send a query letter. A query letter is a short letter that illustrates your story, tells a little about you (in relation to the book you are proposing) and gives a bit of your personality. There are many excellent sample query letters online. Search for the ones posted by agents and writers' magazines. This will give you the best idea of what a query letter should read like. If you send your query letter via email (if the agent says he prefers this method in his guidelines), then follow the format of a standard query letter. Do not become too familiar just because it's an email.
Be patient. The best agents receive thousands of query letters each month and hundreds of submissions. Don't constantly email the agent wondering if they got your letter. Don't call their office. If you have a solid idea or story and the agent is interested, she will definitely let you know.