The answer rests with the paradox of the Party itself. Its propaganda says one thing, but it controls the population in the opposite way. The concept of "doublethink" is the heart of Party slogans, which Emmanuel Goldstein (in the excerpt from his book in chapter 9) explains through the word "blackwhite":

But it means also the ability to believe that black is white, and more, to know that black is white, and to forget that one has ever believed the contrary. This demands a continuous alteration of the past, made possible by the system of thought which really embraces all the rest, and which is known in Newspeak as doublethink. Doublethink is basically the power of holding two contradictory beliefs in one's mind simultaneously, and accepting both of them.

Thus, according to the Party, "war is peace" means that they continually "fight" wars in order to keep peace at home. It is a paradox, but one which the citizens of Oceania don't think too closely on. During times of war, nations generally unite. Of course, if the people are focused on a common enemy, they are much less inclined to notice how unhappy they are in their own lives. So they make less trouble for their government. Thus, if you're always fighting a common enemy, you won't be inclined to turn against your own government.

The government is able to convince people that “war is peace” by telling the people that having a common enemy helps keep the country together in many ways, but it was mostly because of the fact that since there is war, everyone will be afraid which will allow the government to control them easier resulting in peace.