Generally, the more formal the occasion, the more courses are served,
  which of course means more flatware. There should be a different set of utensils for each course: salad fork, dinner fork; dinner knife, bread knife; and so on. 
  

Some special dishes such as oysters have special utensils. These can be served at the presentation of the food, but generally are placed on the table in order of course. When oysters are served as an appetizer for example, set the oyster fork to the right of the spoon. 

Building from the basic set-up (dinner fork on the left of the plate; knife to the right of the plate, dinner spoon to the right of the knife):

On the left side of the plate put the salad fork to the left of the dinner fork. On the right add a soup spoon to the outside of the dinner spoon if soup will be served. Place the soup bowl above the soup spoon  and to the right. The bread plate goes to the left, about two inches above the fork. Place the butter knife across the bread plate at a diagonal, upper left to lower right. Small salad plates go to the left and a little below the bread plate. Dessert spoons, or in some cases knife and fork, are placed about an inch above the top of the plate with the handle(s) on the right side. 

The largest glass on the table is the water glass which goes on the right side above the dinner knife. It may be filled and iced when guests arrive or left empty to be filled at each diner's request. If wine or some other beverage is served, set the appropriate glass to the right and a little down from the water glass.