If you have a valid discount code, you can enter it in a separate field at the shopping cart. The discount will then be deducted directly from the order amount.
A discount code is different from a gift card. A gift card is a method of payment, so you enter the details in the "payment" step, where you also enter credit card or Paypal details. Read more about that by clicking here.