The confused condition causes a Pokémon to hurt itself in its confusion 50% of the time. The damage is done as if the Pokémon attacked itself with a 40-power typeless physical attack.
Confusion wears off after 1-4 attacking turns.
Straight from bulbapedia.And with Prankster its priority :)