To sell items you don't need anymore or buy from the NPCs all you need to do is drag the intended items to their respective windows.
I.e. From your Bag to the NPC Product list to Sell, and from The NPC Product list to your Bag to Buy.
Be aware that the price of the items you sell will be higher if you are a VIP member at the time.
You can also repair your gear from the vendor window for a fee (the fee amount depends on the amount of wear on the item).
When buying or selling a quantity window will appear. Click [+] or [-] to adjust the quantity needed or type the required amount in the quantity box.