Sometimes it does lot of damage,sometimes it does less damage.
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 turns. Pokemon with Own Tempo are immune to being confused.
Source