When you pay with this card in the store, what happens is that payment terminal connects with your bank online. The bank will check its records and verify that there is enough money in your account for the purchase or transaction.
If so, the bank will deduct the money from your account, create a record of it and update your balance after this transaction. Then he credits the money in the same way to the vendor.
For this service, i.e. the creation of these records, your bank, card issuer and payment system providers will then split the fee for the provision of this service, up to 4% of the volume of trade. This fee is usually paid by the merchant with whom you made the purchase.
The networks of computers that record these transactions then make billions of dollars each year for these big companies.