Rest causes your Pokémon to fall asleep. This renders your Pokémon
unable to use any other attacks for a total of 3 turns: the turn on which
Rest is used, a turn on which it is fully asleep, and the next turn during
which it wakes up.
Rest can only be used if your Pokémon is at less than full HP, even if
it's affected by a status change. So if your Pokémon has been paralyzed,
but has not been injured (eg, via Thunder
Wave), it will be unable to clear the paralysis until it loses at
least 1 Hit Point. It doesn't matter how the HP is lost, however.
Note that this attack will fail if the difference between the
attacker's current HP and its maximum is 511, 255, or 0
(full health).
As an example, a Snorlax friend of mine has a maximum HP of 523 and was
down to just 12 HP in battle. He tried to Rest off the damage, but Rest
failed several times while his opponent was sleeping! (523 minus 12 is
511.) He lost the match and his trainer nearly had a stroke. Do the math
and don't let this happen to you.
On the turn that Rest is used, all your Pokémon's HP are restored.
Because Rest changes your Pokémon's status to SLP, it also removes any
poison, burns, or paralyzation (assuming that this last effect did not
prevent the use of Rest). Your Pokémon is protected from any further
status changes while Resting. Rest does not remove or prevent confusion or Leech Seed, however.
Any statistic alterations, including Reflect and Light Screen, are retained while
Resting.
Note that while each usage of Rest takes 3 full turns, only one PP is
used during each nap.
While the number of turns slept has been rumored to be different in
the Colosseum2 mode of Pokémon Yellow, this is not true. Just another
unsubstantiated rumor...