Vendors are NPCs who buy/sell items to/from players. Some vendors are capable of repairing items; typically these vendors will sell weapons and armor, or supplies for blacksmithing or engineering. Vendors representing a certain faction are known as quartermasters, and will only sell items to players who have achieved a certain reputation level. However, they will still buy items from players.
A vendor sells items for four times what they will buy them for; that is, if you bought an item for 20 silver, you could only resell it for 5 silver. Items which have no discernible purpose but to be sold to a vendor are called vendor trash. The act of selling something to an NPC is known as vendoring.
If you sell an item to a vendor by accident, it will appear for a short time on a second tab in the vendor window labeled "buyback." The most recent 12 items you have sold will appear there, including at the window for other merchants. You can retrieve an item from the vendor until you scroll it off the window or until you log out.
Vendoring is a term used for selling items to a vendor, as opposed to placing them on the auction house or saving them.