A dictionary definition:

epiphenomenalism: The doctrine holding that mental activities are simply epiphenomena of the neural processes of the brain.

But the best analogy I ever heard for this idea, possibly from Jung, is this: epiphenomalism considers thinking to be like the steam that rises above a plate of hot spaghetti. We don't consider the steam to be an integral part of the spaghetti. We don't like spaghetti because we like the steam. (Yes, we usually like our spaghetti hot, but again, the steam is just the epiphenomenon of the heat.)

Thinking just happens to be one of those neat things that occurred accidentally as our brains -- whose purpose is simply to perform those autonomic and reflexive actions that keep us alive -- developed and evolved.