The Clan Castle is the ruined structure on your map when you begin a game of Clash of Clans. The idea behind it is for it to be repaired, at which point it can house troops who will defend the base once triggered by nearby enemies (within a 12 square radius).
It is also required for creating or joining a Clan in the game. Once you have repaired the Clan Castle for 40,000 Gold, you are able to move it around the map, wherever you see fit, as it becomes a defensive structure like any other.
Once you are in a Clan, you can request troops from other players. Time for requesting troops varies depending on your clan level. Each clan member can donate up to 5-8 troops to the Clan Castle depending on your clan level. Experience points are given for donating troops, with more given depending on the quality of the troop.
The Clan Castle is best used to provide reinforcements to delay and weaken the enemy before they can attack your inner sanctum. Once a unit come within range of the Clan Castle, the troops within it will come out and attack. The reinforcements will automatically attack the first unit to trigger them. Also, even though they are your own units, they can be damaged your friendly spring traps, so don't put those too near your Castle. When choosing reinforcements, quantity is important as you are aiming to delay the enemy rather than going for powerful and impressive units - keep them busy!
TIP: Upgrade the Clan Castle as soon as possible because it provides great offense and defense!