Player Killing, or also known as Player versus Player and is often abbreviated as pking or pvp, is a large aspect to the game. Player Killing allows players to attack other players for a chance of loot.
There are different types of modes for player killing. Peace, Justice, and Evil, along with others. More information about modes can be found here.
A player can not participate in PvP combat until they reach level 20. Before this they are unable to attack or be attacked. After participating in player killing activites a players 'PK level' goes up. The higher the player killing level the more likely a player is to drop items on their death. Players do not have to kill a player to gain a PK level, however if they attack a player and then stop it counts torwards a PK level although they have killed no one.
As long as you are in Peace Mode you will gain a AFK protection after 1 minute that makes it impossible for anyone to kill you (besides monsters). If you are in any of the other Modes when using the AFK function you can be attacked and killed by other players.