Tarjeta vs. carta

The Spanish words 'tarjeta' and 'carta' both translate to the English word 'card', but they are used in different contexts, indicating distinct types of cards.

Tarjeta

This term is generally used to refer to cards that carry some personal or business information or have a specific purpose - like a credit card, business card, or a membership card.
Pago con mi tarjeta de crédito.
(I pay with my credit card.)
Me ha dado su tarjeta de visita.
(He gave me his business card.)
Tengo una tarjeta de membresía para el gimnasio.
(I have a membership card for the gym.)

Carta

While 'carta' does translate to 'card', it is predominantly used to mean a piece of paper containing a written message, similarly to 'letter' in English. However, it can also refer to certain kinds of cards such as those used in board games or magic tricks.
Escribí una carta de amor para mi novia.
(I wrote a love letter for my girlfriend.)
Los magos usan cartas para sus trucos.
(Magicians use cards for their tricks.)
Jugamos un juego de mesa que requería el uso de cartas.
(We played a board game that required the use of cards.)

Summary

'Tarjeta' and 'carta', although both can mean 'card' in English, are used in different contexts in Spanish. While 'tarjeta' refers mainly to functional cards such as credit or membership cards, 'carta' primarily signifies a piece of written correspondence but can also denote certain playing or game cards.