Soft cheeses, such as cottage cheese, cream cheese and ricotta cheese, that have mold should be discarded. The same goes for any kind of cheese that's shredded, crumbled or sliced.
With these cheeses, the mold can send threads throughout the cheese. In addition, harmful bacteria, such as listeria, brucella, salmonella and E. coli, can grow along with the mold.
Mold generally can't penetrate far into hard and semisoft cheeses, such as cheddar, colby, Parmesan and Swiss. So you can cut away the moldy part and eat the rest of the cheese. Cut off at least 1 inch (2.5 centimeters) around and below the moldy spot. Be sure to keep the knife out of the mold so it doesn't contaminate other parts of the cheese.
Of course, not all molds pose a risk. In fact, some types of mold are used to make cheeses, such as Brie and Camembert. These molds are safe to eat.
If you're not sure what type of cheese you have or what to do if it grows mold, the safe course is to discard it.