In most cases you probably want to use "an example of"
an example of courage
the boss made an example of him
the teacher gave three examples of how to solve differential equations
how many examples of legendary 60's bands can you think of?
"An example for" would be used like this:
Smith wrote down an example FOR Fred to read
Can you think of an example FOR me?