Always inquire and test to see if you are dreaming. Eventually this will build a habit, and you will do it naturally and effortlessly during a dream.
You can also go to sleep while being totally mindful of your body, this will allow you to be lucid in a dreamless sleep. Eventually a dream will arise and you will have a lucid dream.
Two great books by B. Allan Wallace on how to lucid dream are:
Dreaming Yourself Awake: Lucid Dreaming and Tibetan Dream Yoga for Insight and Transformation
Minding Closely: The Four Applications of Mindfulness
The person who just posted shared some great posts. As a lucid dreamer myself, I also want to give out some tips
When I intially discovered lucid dreaming I experimented with many free online "books" I found while browsing online blogs. Yet, after trying these approaches for just under three weeks I still had no containment over my nightmares.
I now see that the component that they were missing was the potent breakdown that I got when I got a serious lucid dreaming course with rather strong feedback, Lucid Dreaming Fast Track. Here is a link to a evaluation: http://www.reviewspanel.com/lucid-dreaming-fast-track/.
When I dream now I can basically do any thing I want (though usually I prefer flying across the seas).
Here is a simple way to get started on lucid dreaming.
This is what I would describe as an anchoring technique. Choose a simple behaviour, such as touching your nose, taking a deep breath, licking your lips, or, popularly, looking at the palms of your hands.
Practice this behaviour several times a day. The idea is that when you practice it, you connect it with the thought "am I dreaming?".
Practice many times a day for as many days as it takes. Eventually, the behaviour will manifest in your dreaming, as behaviours do. As you have practiced the thought, that too will manifest. This time though, you will become aware that you are dreaming. You may be shocked into waking up the first time, but keep trying. When you can keep it together, you will be able to steer your dreaming at will.