I'm suprised that nobody has mentioned lucid dreaming. This is a state where you realise you are dreaming, and use that fact to exhibit some control over the dream.
You can make it happen more often and for longer through practice. Most people who regularly lucid dream have some kind of reality check that they do throughout the day. They take a minute every now out of the day to really check that the world is real. This makes them hope that they develop it as a habit, and they do it in the dream, realise that it is a dream, and then are able to use their conscious mind to control the dream.
This is something I have experienced a few times myself. I've woken up in the dream, and been able to influence exactly what's happening. It's very valuable to play out different scenarios with no risk.
It's very hard to stay in this state, as your eyes tend to try to open (because theyre open in the dream, but not in reality).
for more information read here:
Lucid dreaming - Wikipedia, the free encyclopedia