Historically, real estate agents have represented the seller of a property. The seller, after all, is usually the one who pays their commission, and agents therefore have a fiduciary relationship with the seller. This in no way means that agents may operate outside the bounds of the law and ethical conduct of course. It just means that the real estate agent is just that, an authorized agent of the seller for a particular transaction.
More recent trends have introduced buyer's agents, who usually work on a fee basis exclusively for the buyer, and dual agents. Dual agents represent both seller and buyer, particularly in cases where the agent's company is the listing company. Dual agency is legal in most US states; However, most consumer advocacy organizations recommend against using a dual agent.
This is because there is an inherit conflict of interest for the agent – they receive a commission based on the selling price of the property. The higher the price, the higher their commission, so their reasoning is that dual agents never really have the buyer's best interests at heart.
If you've decided to work with a dual agent, this will need to be disclosed to both the buyer and seller, and they both have to agree, in writing. Dual agents are bound by law and ethics to treat both buyers and sellers honestly, equally, and fairly. Dual agents can be prevented from divulging confidential information about each party to the other. This could severely harm negotiating positions.
The bottom line in dealing with a dual agent is to remember that the buyer and seller have conflicting interests in the price and other terms of the sale. It's very difficult for an agent to truly and equally represent both parties, since the conflicting interests make that inherently impossible.
If you do choose to use a dual agent, be sure the exact nature of your relationship with the dual agent is clear, know what services the agent will be performing for you during the transaction, how the agent will be paid, and how any conflicts that arise will be handled.