Your Castle will start burning if you are attacked and fail to defeat the attackers.
When the Castle is on fire, its walls defense will decrease. The fire will automatically go out after 30 minutes, or you can use Gold and put it out instantly.
Once the fire is out, you can repair the walls to increase the defense.
If the Castle wall defense drops down to 0, your Castle will be teleported automatically to a random location on the map, and then the wall defense will be fully restored.