Just speaking personally, the single most important thing that helped me was to make it a habit upon awakening to remember my dreams in detail. Dreams often repeat themselves, we just don’t notice the repetition because we don’t make an effort to remember them.
After I started consciously remembering my dreams, I began to notice, while in a dream, that “I’ve done this before!”. It was a short step to “I’ve dreamed this before!” When I got to that point while dreaming, I became conscious and could take thoughtful actions in the dream.
When you first start having lucid dreams, don’t be discouraged that the act of “waking up” inside the dream often causes you to actually wake up. Be happy that you have started lucid dreaming, so that you will be creating positive reinforcement to your mind.
The more you lucid dream, the longer you will be able to go in the dream before you wake up. And, with more time in the dream, you will begin to spot the triggers that cause you to wake up. With more control, you will often be able to go back to sleep after waking and resume the same dream.
Take this with a grain of salt – I am sure it is different for everyone.