There is the option to Pay Off any attacker with resources when they attack or get Attack Protection from the Market.
You also get attack protection after paying out or engaging in pvp, so you could attack someone and then be safe for a while after battle.
New players are safe from attack until they build up their walls or reach a certain stage in the quest storyline (around the time you attack an AI player town)
We are re-balancing PvP strength ranges so armies are more evenly matched.
We've also asked for feedback on our UI so that we can improve it.