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).