The air and all surfaces around us are full of moulds, bacteria and yeasts. Thinking that you can totally avoid them on your food is not realistic. Often the products are already a tiny bit contaminated from the manufacturing and packing proces (however clean the factory tries to work). This is nothing to worry about as it will be very very rarely cause any problems. Other products like milk will be sterilized of pasteurized to remove those contaminations.
As someone who makes all kinds of fermented foods on a regular base, I often contaminate food on purpose to start a fermentation proces. Yeast is added on purpose to you bread, beer and wine. Moulds are added to cheese and some meatproducts.
Often unwanted moulds on food products in our fridges are not very harmfull. But if you don't know for sure then throw it away.
cheese:
White moulds on hard cheeses are most of the time eadible. If you don't want them, you can whipe them of with clean paper towel, wash them of with some brine or just remove the mouldy piece on your cheese and eat the rest.
bread:
Most moulds on bread are pretty harmless to but the problem with bread is that it isn't easy to remove the moulds so trowing it away is the best solution.
Best way to store your bread is in a paper bag or a in a bread basket. You should noy leave them in the plastic bags that they come in. Often the bread is put in that bag when it's still hot. The steam coming of that bread will make the inside of the bag very moist and that will help moulds to grow.
fruit and veg:
Fruit and veg often rot very locally. Most of the time, the part of the fruit/veg that in't rotting is eadible. So by cutting away the bad parts, you can still use it.
You should store fruit and veg in a dry place. A cool place will do nicely but don't put them in the fridge. Don't wash them before you put them away as it will speed up the rotting proces.
meat:
Meat is something totally different. I make a lot of cure meats and I do at my my own risk. My advise is: if you don't trust it throw it away. Bacteria in meat can be pretty harmful ranging from some extra visits to the toilet to death.
If you handle meat (especially when you want to store it afterwards), always make sure that you kitchen is super clean and wash your hands every time before you touch te meat. Always store it in the fridge.
Take special care with prepared foods. They are one of the mayor sources of food poisoning. Most of them will perish rare fast ranging from 2 days to a week (depending on how much preservatives are in it) keep the in the fridge at all times.
A good tip to avoid contaminations in you fridge is to put the dy goods on the top shelves and the wet and liquid goods on the lower ones. This way you can avoid contamination when something spills or drips.