War mode was implemented in the 8.0 patch, also known as the Battle for Azeroth prepatch, and has fully replaced PvP relams. This means that anyone from any server can choose if they want to participate in PvP or not by turning on or off War mode.
To turn on or turn off Warmode, you firstly need to head to Stormwind if you play Alliance, or Orgrimmar if you play Horde. Once in your capital city, open up your talent screen (default N on the keyboard), and click on the small button in the bottom right corner of the window. If this box is checked, War mode is active, and if it's unchecked, War mode is deactive.
It's free to turn War mode on and off, and you can do it as often as you like as long as you are in your capital city.
When War mode is active, you are constantly flagged for PvP, and will only be able to play with other people who have turned War mode on. If you deactivate it, no one from the other faction can attack you even if you play on a PvP realm.
You get an additional 10 % bonus experience from all sources if you play with War mode active, as well as the ability to use four different PvP talents. These are active at all times, and not only when you are actively taking part in a PvP battle!