A debit card is attached to an account that has real money in it. The card can be used for retail or online purchases, using the funds actually in the account in real time.
By contrast, a gift card has only a certain amount of money on it, such as $50 or $200. While a gift card may have a Mastercard imprint, that card number is only good as long as there are funds remaining on the gift card. Once it runs out, that card is no longer useful.