One of the abiding themes of the poem is loyalty. Despite his unjust treatment at the hands of King Alfonso, banished from Castile on trumped-up charges of corruption, El Cid still maintains unswerving loyalty to his lord and master. Everything he does post-exile is concerned with getting back into the king's good books, in the hope that Alfonso will realize that the accusations leveled against this most loyal of servants were completely false.
But it is not enough for El Cid to proclaim his loyalty; he must demonstrate it on the field of battle. And he does, racking up an impressive string of victories against rival kingdoms including the Moors. As well as showing loyalty, El Cid's conquests remind King Alfonso of just what he's missing, and how foolish and short-sighted he acted in expelling El Cid from his court.
Cantar de Mio Cid is the definitive work of the Spanish epic and the Spanish epic hero. El Cid (a nickname referring to his status as a nobleman) has all the traits of a Spanish hero. He is a man of integrity who holds honor and loyalty as key elements to a successful life. He will avenge treachery and restore his honor and the honor of his family at any cost. He is both generous and crafty. His loyalty is to his king, his people, and his family.
The link below lists a number of possible themes, but the overriding message of the poem is the importance of protecting the family honor. (If you have seen The Princess Bride you have a good idea of the importance of honor to spaniard in the Inigo Montoya character.)
Honor (and its accompanying characteristics of loyalty, integrity, and generosity) make a hero. The epic hero is also powerful in battle and wise in negotiation. El Cid is both, making him the only medieval epic hero from the Spanish world.