Most PvP combat involves attacking players of the opposite faction. These interactions are controlled by the Flag of War. Each player has a Flag of War that is located on the top right-hand side of their character portrait. Its status can be changed simply by clicking on it.
Raising your Flag of War will allow you to attack other players, but will also allow them to attack you. If you do not want to engage in PvP combat, you can lower your Flag of War so that other players will not be able to attack you. After lowering the flag, you must refrain from PvP combat for five minutes before it takes effect.
However, when your Flag of War is raised you will gain additional experience from killing monsters and completing quests. Because of this, it can often be advantageous to keep it raised.