The white line around your castle acts as the border of your castle for which enemies have to cross to plunder your village. The outside of your castle around the line has to be as built up and hard to get by as possible. Enemy AI and players that attack you can steal gold, resources, weapons etc. from you by spending prolonged periods of time inside your white line. The best defence is to have great towers surrounding the entire white, lines of moats or a mix of the two. Having killing pits is not a good option because the enemy walks over them pillaging before they die. An enemy crossing your white line from a pillage wave can also mean buildings being destroyed which can be very costly and time consuming if you have a very built up village, so the best practice is really to make it as hard as possible for the enemy to cross the white line.