The most important thing to do when having recurring nightmares is identifying the causes of the nightmares and dealing with the issue. Otherwise, you'll just have to grit your teeth and wait for them to pass on their own.
In my case I have nightmares during times of stress. When I'm stressed about an upcoming event, such as exams, going abroad (I have a phobia of flying), moving house etc. I tend to have nightmares. The nightmares themselves are often different, although they almost always revolve around a certain theme. For example, if I was about to go on holiday I would have nightmares about plane crashes, although the dreams themselves are actually different. Because I have nightmares during these times, its hard for me to deal with them because I can't really face the issues causing them until the event passes.
So when I know something stressful is coming up, I take certain measures to help prevent nightmares. One of the most effective methods I've found is telling people or writing down what happened in the dreams. When I have a nightmare, to me it is genuinely scary but when I try to explain it, it just sounds ridiculous which helps me take it less seriously and lowers the anxiety, making it easier to sleep to help maintain sleeping patterns.
Another method I found useful is to avoid eating before bed, especially fatty, sugary or high-energy foods. If you go to bed after having just eaten, your digestive system remains active and has to work longer when it should be resting with the rest of your body. This allegedly makes the stages of sleeping more irregular, leading you to spend more time in REM (Rapid Eye Movement) sleep, which is the stage in which dreams take place. Although these foods don't actively contribute towards having nightmares, if you're going through a period of having nightmares, the last thing you want is to increase the chances of having a dream.
I also find it helpful to sleep with a television or lamp on, which makes me feel less anxious when I wake up after a nightmare.