Rosie -
You go to an online exchange, such as raise.com, and set up an account. If you are buying, then you can browse the listings and when you find a card you want, just click on it and purchase it. A physical card will come in the mail in a few days. An egift card will be emailed to you within 24 hours. Some even let you print out the card to use in the store. Otherwise, egift cards can be used at the store's website. Just enter the card info emailed to you.
For selling, you set up an account and provide card information. Then you choose the price you want for your card. It is wise to browse the site and see how much similar cards have been discounted. You are charged a fee if someone purchases your card and shipping if a physical card is to be sent to your buyer. Your earnings will be sent to you or a PayPal account, etc.