Mold is a perfectly natural part of the environment. We need molds, which are a type of fungi (think of them as the cousin of mushrooms), to break down dead matter such as trees and leaves. The problem is that we don't want mold growth occurring in indoor environments.
Molds reproduce using microscopic spores (one tenth of the width of a human hair) that float through the air and land on surfaces. They need three things to begin growing: oxygen (pretty much always available), food (almost any material such as wood, sheet-rock or fabric will do) and water. Mold takes about 48 to 72 hours to begin reproducing.
As you may have guessed, the only one of these variables that we can control is water. So essentially, when there is a leak or high humidity and surfaces stay wet for too long, mold growth will occur. It's that simple.