Where is data stored on a credit card?

in a magnetic stripe, for magnetic cards

and in a chip, for smart cards