Leitmotif was something developed by the German Composer Richard Wagner. In a nutshell it is associating certain characters with certain musical themes or melodies. Most of you have heard the "Kill the Wabbit" theme from the Bugs Bunny cartoons. Well, this is the Valkyrie's theme in one of Wagner's operas. John Williams used this technique of relating melody with people, places, and things ingeniously in his Star Wars trilogy.
One of my favorite examples: In The Empire Strikes back we find Luke hanging upside down in the Ice monster’s cave awaiting his eating. Luke comes-to and sees his light saber. To give the scene the tension and impending terror it needs Williams employs a sort of swirling cluster of strings. The dissonance is felt every time we see hints of the monster getting ready to return to Luke. All seems hopeless to Luke. Then Luke sees it. His light saber. He reaches for it. Over the quiet, swirling string dissonance the brass swells in more dissonance to represent Luke's attempt at moving it with the force. The light saber barely moves. Then, the leitmotif for "the force" is employed and chills are sent up our spine. Over the swirling dissonance, as Luke closes his eyes to use the force we hear that familiar theme. The juxtaposition of the swirling dissonance and the haunting melodic representation of the force gives the scene power, beauty and magic. Genius.