I think out of all the business relationships you will enter into in this business the agent/author one is the most straightforward. I had a contract to sign which stipulated amoungst other things what percentage they took of my advances as well as how to end the relationship should the need arise on either side. Some agents however don't even have contracts, work more off of a handshake method which is perfectly acceptable in the industry.
Often what happens is an agent will read your MS, like it, and offer editing suggestions. Usually this is important two fold, one to help make the MS as strong as possible before sending it out and two to see if you as an author are capable of making editorial changes, and to see how easy you are to work with. Often there can be several months of such back and forth before an offer is made. Once an offer is made, sometimes the agent and author meet in person or they chat over the phone to discuss plans - where they each see the author's career going.
Then possibly a contract is signed (or not). And then, once the MS is perfect, the agent takes over and sends off your work to publishers. Sometimes they might request your help in creating an interesting pitch, or writing up a bio for them. Again it all depends. They then negotiate all contracts for you, and attempt to explain said contracts to you in turn. When you get paid, the publisher pays the agent, who then takes her cut and then passes it onto you.
It's interesting to be sure to know what will be, but have no fear that when the time comes you will be walked through it in a way that you won't feel overwhelmed.