From what I understand, once it starts it's almost impossible to stop. If you're not overwatering, have normal humidity, etc., then there's a good chance that the fungus was already present in the soil you're using.

Zandor explains the ugly process really well in this thread: Damping Off.
Mr. Clandestine Reviewed by Mr. Clandestine on . WTF? Stems turnin black...help. Never had this problem before.....guess its called damping off, canker, or psylum (pretty sure Im spelling that wrong). But what the hell causes this shit?! I have heard that high humidity and overwatering are the main causes but my humidity is fine (50-60%) and Im not watering ANY more than I have in the past with great results. The blackening of the stems only occurs right at the base as the stem meets the soil, starts off kinda purple and then goes to black and moldy looking resulting in the Rating: 5