Ranking or point or xp system

How the xp system works can someone explain, like what to do we get when we win a clash ??

XP stands for Experience Points. You gain them by solving puzzles, fulfilling achievements or steps on the quest map or entering new leagues on bot competitions. Winning clashes does not give XPs.