It varies from cheese to cheese. If a cheese you purchase develops surface mold, the FDA has the following recommendations:
For hard cheeses such as Cheddar, Emmentaler, and Parmesan, mold generally cannot penetrate deep into the product. Therefore, surface mold can be cut off at least 1 inch around and below the mold spot (keep the knife out of the mold itself so it will not cross-contaminate other parts of the cheese). After trimming off the mold, re-cover the cheese in fresh wrap.
For soft cheeses with high moisture content such as Chèvre, mold can cause contamination below the surface. In this case, these cheeses should be discarded.
For cheeses made with mold (such as Roquefort, Stilton, Brie, and Camembert), the molds that develop into blue veining and other such indicators are not only safe to eat, but can be beneficial. However, molds that are not a part of the manufacturing process can be dangerous. Discard soft cheeses such as Brie and Camembert if they contain molds that are not a part of the manufacturing process. If surface mold is on hard cheeses such as Gorgonzola and Stilton, cut off mold at least 1 inch around and below the mold spot and handle like hard cheese (above).