What causes Mud Fever or Scratches?

I would like to tell you I know what the cause of Mud Fever is, but I honestly think there are different causes. Not all cases are the same, and this is why some treatments work on some and not others. Sometimes it is contagious as in all the horses get it and other times it is not.