There are 4 rarity levels, with the Common cards more likely to be found in a loot box than a Rare card, which is more likely to be found than an Epic and so on. The 4 levels in order of rarity (less rare to more) are:

Common (grey border)
Rare (blue border)
Epic (orange border)
Legendary (purple border)

The maximum level of a card differs based on its rarity. The maximum levels of each rarity are as follows:

Common: Level 20
Rare: Level 18
Epic: Level 15
Legendary: Level 9