In other languages
French: repos, German: erholung, Italian: riposo, Spanish: descanso, Dutch: rust, Portuguese: Repouso.
Rest restores all of the user's current HP, and makes the user fall asleep. The user will be asleep for one turn, wake up on the next turn, and then be able to attack after that. The sleep countdown of Rest is not reset by switching.
Since the user falls asleep, it will be cured of any major status ailments it had prior to the use of Rest, but Rest will not reset the stat reductions caused by paralysis or burns, will not reset the cumulative nature of Toxic, and will not count towards turns confused.
Rest will fail if the difference between the user's current and maximum HP is 0, or if (user's maximum HP - user's current HP) mod 256 = 255. If the user's current HP is greater than its maximum HP, Rest will set the user's current HP to equal its maximum HP and make the user fall asleep.
In Stadium, Rest will fail only when the difference between the user's current and maximum HP is 0. Rest will reset the cumulative nature of Toxic and the stat drops due to paralysis and burns.
By leveling up
In Generation III, Rest is TM44. All Pokémon that can use TMs can learn Rest.