The cleanliness of food and water in many developing countries can pose a serious health risk to travelers. Just because the locals are eating and drinking it, doesn't mean that you should. They've had their entire lives to build up an immunity to it. You, however, were raised in a sterile bubble. Expect the locals to laugh at you about this.
When it comes to food, there's an old saying: peel it, cook it, wash it, or vomit. When in developing countries, you'll need to peel fresh fruits and vegetables, or cook them, before eating. Always use clean bottled water when washing food. This means that salads should be avoided. Carrying a pocket knife will be useful. Also, many people recommend that you avoid dairy products. In many countries, the milk, ice cream, and yogurt are extremely and immediately fresh. The only thing worse is when it's not so fresh.
As you probably already know, you shouldn't drink the water in many developing countries. If you're in such a country, make sure that any raw foods you eat are washed with bottled water. Also, use bottled water to brush your teeth.
Some people claim that you should never eat street food. Others say that you should only eat street food. Ultimately, it depends on where you are and what the food looks like. How was it cooked? Did that meat get hot enough? Was it washed in clean water? There's no simple rule, just pay attention to the cooking process. Sometimes street food can be fresher than food from a restaurant.
It's not all bad, though. Use your best judgment. Food around the world is why many of us travel. It's part of the experience, and it can be really really good. Just use common sense and you will stay out of trouble. And in the end, there's always Cipro.