Soft cheeses, such as cottage cheese, cream cheese and ricotta, with 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 — contaminating more than you see. 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. Some types of mold are used to make cheeses, such as Brie and Camembert. These molds are safe for healthy adults to eat. However, these cheeses, as well as other soft cheeses and cheeses made with unpasteurized milk, are best avoided by people with weakened immune systems, older adults, pregnant women, infants and young children.
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.