Tarring and feathering is an old punishment that goes back to the Middle Ages. However, it's mostly known for its use in the 18th century by mobs wishing to "punish" either public officials they hated, or private citizens they felt betrayed the public in some way. Generally it was used during the American Revolutionary period on tax officials or citizens who perhaps violated a non-importation protest.
Basically a person was stripped to the waist and immobilized, then pine tar was either brushed or poured over their body. (This ususally resulted in first degree burns.) Finally, feathers (usually from a chicken) were either thrown on them, or they were forced to roll around in a pile of them, so that the feathers stuck to the tar. Sometimes the person was paraded through the town in a cart or tied to a rail.
Why was it used? To publicly humiliate the victim. The tar would stick for days, so this was an extended punishment (not to mention the effects of the burns.) The objective was to drive them out of town, or force them to toe the line.