When you attack an opponent, you do so with a number of armies.
Depending on your track record for expanding your territory through war, your opponents track record for defending his territory and some random luck you either win or loose.
As with moving armies, raging war also takes time.