Lunar Dance causes the user to faint, but restores the HP, PP and removes all status ailments of the Pokémon that is sent out to take its place. The Pokémon is sent out before the end of the turn so if the user moves before the opponent then the Pokémon will be sent out followed by the opponents attack, however in Generation V the Pokémon is sent out at the end of the turn after all other Pokémon have moved.
Bold indicates a Pokémon which gets STAB from this move. Italic indicates a Pokémon whose evolution or alternate form gets STAB from this move.
In other games
Pokémon Mystery Dungeon: Lunar Dance reduces the user's HP to 1, and restores all the HP and PP of team members in the same room as the user. It also removes any status ailments on those Pokémon and breaks any move seals caused by seal traps.