Swagger raises the target's Attack two stages and confuses it. Should the target already be confused, or be protected by confusion due to Safeguard, Swagger will still raise its Attack. Pokémon with the Ability Own Tempo are immune to both effects. Because the target's Attack increases, they will receive more damage if they hurt themselves.
Bulbapedia