1 Test for troops
The first thing you need to do is to figure out whether a castle has troops or not. Put a single unit near the castle and see if any troops show up.
2 Defeat them away from town
Put some troops away from the buildings but near the castle or near the wandering troops.
3 Some units engage right away
Archers ,for example, engage right away with Clan Castle troops. Giants on the other hand will usually ignore them and keep moving towards the defenses.
4 Barbarians are effective
Barbarians can be effective in killing Clan Castle troops.
5 Circle them
Place your troops in a circle around them once you lure them away from the defenses. See also why Clash of Clans is bad for you.
6 Don't use all troops
The point where you lured the clan castle troops might not be ideal for attacking the village so make sure you have other troops to drop in different points after killing them.
7 Witches are good
If you have reached a level where you can use witches then bring them to battle. All clan castle troops will usually focus on one skeleton, which is released by witches, giving others the change to kill them.
8 Use a Lightening spell
Lightening spell can also be very useful if used right. Make sure you aim it in the right position so that you end up killing all defense troops.
9 Drop your troops far
Make sure you drop your troops in an area far away to lure the defense troops to that place. See also why Clash of Clans is so addictive.