When you're having a lucid dream, you know you're dreaming. "Lucid" means, in this case, "aware".

It can be tricky at times and with certain kinds of experiences to recognise reality, but some people recognise and experience reality as a kind of dream, so there's also that... (Yes, I'm muddying the waters. What I wrote may be meaningless to you. That's okay. One day, it will mean something to someone, anyway, if not to you, now.)