The resurrect bug is triggered when an online player attacks an offline player, and that offline player re-enters the realm after the fight has begun, but before it has been completed, with the death of the once-offline player. The attacker gains experience, gems and any on-hand gold.
Meanwhile, the logging-in player receives the message that s/he has been killed, as they reach the Town Square. Yet they are alive, with any gold still in hand and full HP.
Killing this player a second time is a no-no in all colored realms, as they should technically be dead and unavailable for killing. They should be set to dead, but this does not happen every time, due to timeliness issues. Usually someone else comes along and kills the player off again. If this is done on purpose by a level 12, is it acceptable, as that effectively removes the "extra" experience from the EXP pool for the day.
This bug was heavily exploited during one of Test Realm's rounds, when Dazhbog, Ram, Ender, Einherjar and Valkyrie created Team Pantheon and set out to exploit their way to the top. Players would multiply gems and gold on hand several times each day by heavily exploiting the Resurrect bug. It was a thing of beauty, but as all things of beauty are, it was ephemeral, as complaints rose so loudly that The Mystical One actually made rules for Special Realm prohibiting heavy bug exploitation.