Your debit card is just an identifier on where to send the transaction. The amount, merchant, PIN (if applicable) and other data are bundled up and sent to your bank in an encrypted message saying "Your cardholder is at my merchant requesting X amount. Here are his credentials, do you approve?" Your bank in its system will look up your bank account based on your card details to see if you have money, then they will respond by saying yes or no, without transmitting any of your personal information.