Eat Safely
Food is the real threat to your stomach. Most high-end restaurants, particularly tourist restaurants, adhere to a very high standard of cleanliness, and you should have no problems with the food they serve. You should look for more affordable options, less touristy areas, and especially market stall restaurants and street vendors. This is not to say you shouldn't eat there. It just means you need to know what you can and shouldn't eat if you don't have a large bottle of Pepto-Bismol at home and constant access to a toilet.
Fresh salads, fresh fruit, and ice should be avoided in questionable restaurants. This is because the fresh salads and fruit may have been washed in contaminated water or may still harbor bacteria if not properly cleaned. You should be cautious of ice because it may have been made with unpurified tap water. If you are concerned, either don't eat or drink it, or politely ask the waiter if they clean their produce and make ice with purified or bottled water. In lower-end restaurants, look for dirty silverware, cups, and plates. It is not considered impolite to return dirty items. If your silverware comes to you wet, dry it off with a napkin before you use it. This is unquestionably one of the most important things you should know before traveling to Peru.