Listing Agents usually deal with sellers, and are the ones who will list a property for sale on the Multiple Listing Service.
Selling Agents (also Buyers Agents) mostly deal with the homebuyers, usually only listing just a few homes for sale. They will sell the homes (which have been placed in the MLS) via the listing agents.
The majority of agents will focus on one or the other. Some agents will also divide their time between sellers and buyers and are usually regarded as the best ones since they are dealing with both sides of the coin.
If you phone an agent from a magazine or newspaper ad, you are usually contacting the listing agent. These agents will place ads to show the seller that they are making an effort to sell their home. Also their advertising efforts can draw others who may decide to sell their homes.