As Kevin says, to 'doze off' is the process of falling asleep, usually lightly and for a short while. For example, '
'The room was so warm, and the lecture was so boring that it was hard for me not to doze off'.
'Forty winks' is a noun, meaning a short sleep or a 'nap'.
'I'm just going to lie down and have/take forty winks.'
In Britain, as in the USA, 'doze off' is a common phrase, while 'forty winks' is rather cliched and old-fashioned and mainly used by elderly people.