How do I prevent nightmares?

Prazosin. Also, prazosin (a medication for blood pressure) is effective in reducing nightmares, particularly in people with ptsd. It is not sedating, but it is thought to alter sleep architecture for the better. It is started at low dose (1-2mg) but doses as high as 10-12mg or more may be necessary. 5mg seems about average from my experience. Side effects are related to a decrease in blood pressure.
VIsual Imagery. Also..I have found visual imagery before bed can help immensely relieve the days stressors and possibly prevent nightmares. Maureen garth wrote starbrite and moonbeam and these are amazing books to help. Check on amazon or barnes and noble.Com.
You can't. Nightmares are interesting. In young children they often are simply reliving their day in their sleep and can present as a nightmare. They are a common childhood occurrence. With nightmares children will wake and be scared. Night terrors are a sleep disorder that are also common. The child is not awake when they are talking, crying or sleepwalking. See tip for more info.