Nightmare is an offensive Ghost-type move.
Nightmare only works if the target is asleep. Nightmare will reduce the target's health by one quarter of its maximum HP at the end of each turn. Nightmare will end if the target awakens from its sleep and its effects will not continue if a target is put back to sleep. However, if the target is put to sleep in the same turn it was woken up by an item, the effects will continue.
Pokémon that learn Nightmare
By leveling up