While in combat and skilling at the same time (ie cleaning a herb while in combat) you have the chance to spawn a random event monster. This random event monster does not take priority over the monster you were fighting previously and will despawn after a few seconds. When it despawns without you killing it, the game no longer allows you to skill until you relog.