Word painting is a technique used to literally depict or 'paint' the image of the lyrics in the music. For example loud dynamics could paint lyrics displaying anger or acending scales could represent 'going up'.
There are great examples of word painting in the famous Bohemian Rhapsody which really add to the story and image of the piece. For example ion the word 'landslide' there is a slide in he melody line. The melody ascends on the lyrics 'look up to the skies and see' which is another example. In the 'Thunderbolt and lightning very very frightning' section there are extreme dynamics to depict the crashes of thunder, this not only creates excitement for us but also lets us visualise the thunder and lightning storm. A final example of word painting is the three descending chords after the phrase '..Leave me to die..' which gives us an image of someone falling to their death.
Great composers such as Bach and Tchaicovsky also used wordpainting in their pieces, (great examples are Bach Cantata BWV 78) it is very important for helping us to visualise the lyrics while listening to the music. Once you begin to understand wordpainting it will open you eyes(and ears) to it while listening to all genres of music and you see the hidden images in all these masterpieces.