どうして and なぜ are synonyms.
どうして in other contexts can also be used to des to ask 'in what way' (effectively 'how'). This does not change the fact that in other situations, it is identical to なぜ.
なんで is another synonym that means 'why.'
なんで is more informal. I could be wrong, but it also seems like men use なんで more and women どうして, though both sexes use both.
なぜ, to me, has a slightly more rational feel while the others are slightly more emotional.
For all intents and purposes however, feel free to use the three interchangeably, though drop なんで in formal situations...