When I was younger, my older cousin told me that she used to lucid dream. In short, this meant that she was able to control her own actions within her dreams. To do this, she would become aware that she was dreaming, and therefore be able to take control of her actions and what would happen. This was always such an interesting concept to me, and I even researched how you could train yourself to lucid dream. There are many ways you can do this, like creating patterns in your life surrounding your dreams. For example, you could draw a dot on your hand and remind yourself that every time you look at the dot to ask yourself if you were dreaming.
The science behind lucid dreaming is that you are somewhere between asleep and awake. you are at a point where you have control of your consciousness but are still in a dream state. Therefore, you are able to use your usual abilities to create your own adventures within your dreams. Although this is something you can develop the ability to do, some people simply come upon this ability or are born with it. Like my cousin, this makes you more likely to experience lucidity with frequency.
Sources: http://www.susanblackmore.co.uk/Articles/si91ld.html, http://science.howstuffworks.com/life/inside-the-mind/human-brain/lucid-dreaming.htm, https://www.psychologytoday.com/blog/the-superhuman-mind/201212/lucid-dreaming-and-self-realization