When you sleep you go through phases (or cycles) of sleep
these phases are called Rem and nrem
Rem sleep (rapid eye movement): this cycle is a light sleep
·dreams usually occur within this cycle
Nrem sleep (non rapid eye movement): this cycle is a deep sleep