Some believe it is lucid dreaming. Other people strongly believe that you actually leave your body. Also, you can will yourself to astral project in a lucid dream. All you do is say "I want to leave my body now" when you're in a lucid dream. Then imagine doing so. The only thing about that method is that it's hard to differentiate between dream and reality in that. So most people actually do it the regular way.