He or she is a person who presents a writer's work to a publishing house, negotiates the writer's contract, and acts as an advocate for the writer and a go-between for the writer and the publishing house.
An agent normally gets a 15 percent commission of the writer's contract. If an agent is asking for more than 15 percent they should give you a damn good reason why!
And please remember, no reputable agent will EVER ask you for money out of your pocket. The agent should not get paid unless they get you a contract, and then they get their money off the top. The publisher does not send you royalty checks, they send the checks to the agent. The agent then cashes the check, and cuts you a check for the amount of the royalty minus their commission. No reputable agent will ever require a reading fee, a retainer fee, or any other kind of fee. They get their commission, and that's it!