One year old screams with nightmares

My baby just turned one. Sometimes she sleeps all night. Other times she wakes up screaming with eyes shut. What’s the problem. It’s really scary at night