If I get cashback on my credit card along with a purchase at a supermarket, do the c.card company charge me?


No. Indeed the bank will take care of that.
If you purchase item X using Y banks credit card, the cash-back amount will be paid to the bank Y to company X.
Since it is an transaction in Bank Y. they get profited from that.