There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.
If this question can be reworded to fit the rules in the help center, please edit the question.

There is no rule when to use which one, especially in case of um. You must simply learn which verb demands one of these three words. Some verbs and phrases use um and there is no reason why:

Um Gottes willen!
um einen Gefallen bitten

In my feel for language I tend to think um in the meaning of this topic here is a relict of former times and only used rarely in certain fixed phrases, but I may be wrong.

Both ones, für and gegen are used for all other stuff where um is not used. I cannot find an example where um can be replaced by one of them.

Gegen is used when there is an exchange of things, commonly something for the price of another, and it shows the two directions of exchanging, for example Ware gegen Geld.

Für in the meaning of "for" is commonly used to tell the addressed receiver ("Für wen?") of the result, for example für alle, or the cost itself ("Für was?"). But usually you can use für also as replacement of gegen, it more underlines the price in contrast to gegen which underlines the exchange, but not inevitably. For example Ich mach das nur für Geld accents a bit more what the price is ("Geld"), and Ich mach das nur gegen Geld accents a bit more that there is actually a price and that it's not for free.

You should change the last paragraph a bit. At the moment, it sounds as if one could exchange für by gegen in nearly all circumstances. But this is only the case, if für has the meaning of the cost itself.
–
ToschoJul 12 '13 at 10:13