Simply put the numbers and letters on a card represent the attack value, attack type, and defensive values (physical and magical) of that card.
For example:
1P24
1 (Attack value) P (Type - Physical) 2 (Physical defence) 4 (Magical defense)
The card's type decides which defensive value it attacks when placed. In the above example, Physical cards attack the physical defence of adjacent cards.
M - Magic cards - attack the magical defense
X - Power cards - attack the lowest of the two values.
Cards with A as a stat have a special behaviour.
I refer you to this FAQ found at GameFAQS for a more in depth explanation.