Heat doesn't have any affect on mycotoxins so cooking won't do anything towards making moldy foods safe to eat. Foods to which molds have been intentionally added under controlled conditions, like Roquefort cheese, are safe. Molds are a type of fungus and are widespread in nature. They can be blue, green, pink, white or black. Molds generally like warm, damp places, but some can tolerate cold and even freezing temperatures.
Some molds can thrive in salty and high sugar foods too.
You can usually recognize molds by their furry or fuzzy appearance. They grow in tangled masses that spread rapidly and may cover several inches of food in two to three days. The mass is composed of filaments, something like the tentacles of an octopus, which grow out and down into the food. These filaments can be so fine that they cannot be seen without magnification. If a food is covered with mold you must discard it.