Query Expansion is a huge field in itself under IR (Information Retrieval).
Also, WordNet is by itself huge, and so it is difficult to find single step-by-step directions. However, there are tons of very good resources. I got started with it by taking several web examples and trying them out myself.
Resources you will find useful in getting started.
- The wordnet site itself (with examples)
- The WordNet Wikipedia page
- Python Programming.net has a WordNet tutorial page
- Even if you don't know Python, I would highly recommend the O'Reilly book "Natural Language Processing with Python". It's website has TONS of examples to get you started.
Hope that helps you get going.