The answer to your question really depends on what the "It" refers to. If the "It" refers to a homework assignment or an examination, then the sentence, "It was a nightmare," is indeed a metaphor. Neither an examination nor a homework assignment is literally a nightmare. In these instances, the metaphor exaggerates and emphasizes how difficult and unwelcome the homework or examination was.
However, if the "It" in the sentence refers to a dream, then the sentence is not a metaphor. If, for example, somebody were describing a bad dream that he or she had last night, then describing that dream as a nightmare is not a metaphor, because a nightmare is simply a type of dream.
A metaphor is a figure of speech in which one thing is described as another thing than it can not possibly, literally be. For example, when I went for a run this morning the wind was very strong, and this made the run a little more difficult. I could of course just say that the wind was very strong, as I have, or I could use a metaphor and say that the wind was a tidal wave crashing into me time and time again. Using a metaphor like this simply exaggerates the strength of the wind, and, in creating a vivid, distinctive image, emphasizes how the wind made the run more difficult.
Get Ahead with eNotes
Start your 48-hour free trial to access everything you need to rise to the top of the class. Enjoy expert answers and study guides ad-free and take your learning to the next level.
Already a member? Log in here.