To make progress in the game, it is of great interest to explore the world. However, it is as least important to consider the defense of your village.
If you send out all your armies to explore the world, while leaving the village unprotected, this highly increases the risk for getting attacked by both animals and other players.
By building a wall, a moat and two arrow towers, you can increase your resistance against violent damage attacks towards your village but also the damage caused by your units in your home army.
However, these buildings will not make much of a difference if you are not keeping any troops at home the moment you are being attacked.
Here are some advantages for having your army inside your village:
What happens to your units when they are defeated depends on what command the attacking army used.
It is very important to know that if you dont have a Garrison your trained units will have no place to hide.
In that case if the attackers have at least two armies stronger than your home army, they will be able kill a lot of your units with ease.
This may happen if your home army is defeated against:
Animals/computer-controlled armies:
Another player who has utilized the Plunder command
Another player who has utilized the Demolish command
To fully understand what is going on when you are under attack you need to learn how to perform attacks.
When someone is plundering your village a battle will occur between that player's army and your home army. You can always go to your notifications and view the battle report afterwards to find out who attacked you and with what kind of troops.
There are two different commands that you can perform for your army in able to attack another village: Demolish lets you raze the village to the ground but is quite time consuming, and plunder that let you steal some of your enemy's resources.
Some heroes have the ability to steal items from other armies. If you attack a village you have a chance to steal items both from the village inventory and the home army's inventory.