In 1984, the world is divided into three states: Oceania, Eastasia, and Eurasia. Oceania is constantly at war with one of these states while at peace with the other. For the majority of the book, Oceania is at war with Eastasia and is allied with Eurasia. Winston, however, clearly remembers a time when Eurasia was the enemy, but the party have rewritten the official history and nobody is prepared to contradict this (Part 1, Chapter 3). So the party continues to vilify Eastasia by encouraging public hatred of the country and by executing its war criminals.
Suddenly, in the middle of Hate Week, an event designed to encourage hatred of Eastasia, Oceania switches its enemy. This happens without any warning and, all of a sudden, Oceania is at war with Eurasia and the war with Eastasia never existed. This happens in Part 2, Chapter 9, and brings the realisation to Winston that the entire history of the last five years will need to be rewritten.
But, as Julia notes in Part 1, Chapter 5, the enemy is not really significant: "It's always one bloody war after another, and one knows the news is all lies anyway." In other words, it's not the enemy who matters but rather the fact that Oceania is constantly at war. Whether the war is even happening is another non-issue: again, it is the fact that the party maintains a constant state of war that is truly significant. As Goldstein comments in his book in Part 2, Chapter 9, by keeping the people in this constant state, the party is able to perpetuate an unequal distribution of wealth. It is this unequal distribution which keeps the citizens of Oceania controlled and conquered.