The goal of the X-wars is to get your clan at the top of the X-wars ranking. It is a clan-to-clan competition. To gather points you have to play games against members of others clans. Playing against your own clan members will not get you any points (with exception of 2 vs 2 clan games.
A match qualifies for the X-wars when there is an even distribution of players from different clans.
When you start a new game as a clan member you have a new option 'X-War'. If you check this option, only clan members (of any clan) can enter your game. If you un-check the X-War option, the game will not qualify for the X-wars even if all players are clan members.
The score that counts for the position of your clan in the ranking is the average of the individual x-wars ranking points from each of the (active) players in your clan.