Clan XP is gained by successfully competing in Clan Wars. Every Clan, regardless of past experience will begin at XP Level 1.  XP is unlocked as follows:

Defeat an enemy War Base to earn Clan XP. The stronger the opponent, the more Clan XP a victory will be worth!

Winning Stars is good -- winning Stars AND winning the War is even better. The more Stars, the more wins, the bigger the XP reward, the more cool perks.

These features not only make Clash of Clans more competitive, but more awesome altogether. A comprehensive list of Perks can be found in the "My Clan" section of your profile.

Other important information:

-Perks apply only to your Clan, as if you leave you cannot take them with you.