An agent can help you get your book published, especially if you want to write specifically for an audience rather than just submitting your work blind. However, they don't guarantee that your book will be accepted by publishers or that they will receive any portion of the sales revenue.