Usually, on a tour to Peru, the first encounter with high altitudes will be in the city of Cusco. At about 11,200 feet, you are going to feel the lack of oxygen. 90% of people are fine with it and just feel a bit tired. Some might have a slight headache. The rest, always about 10%, are going to suffer from altitude sickness. It usually feels like a major hangover, headache and vomiting.
The first thing we do upon arrival in Cusco is to drink coca tea and/or chew coca leaves. The Peruvians have been doing it for years as a remedy. Your hotel will usually provide coca tea/leaves as well as oxygen if you need it. I also advocate keeping very well hydrated, taking it easy the first day, laying off the booze, and eating light, familiar foods.
If you have serious concerns about altitude sickness, visit your doctor before making a trip to Peru. Since I am not a doctor, I am reluctant to give medical advice. But I can tell you that our travelers to Peru and Machu Picchu have brought medications with them that they take before hitting the high altitudes to help them deal with soroche.
If you do get AMS, and as I said, 10% of my travelers always do, the best thing to do is hit the sack, take some coca tea, and sleep it off. In every single instance where I have encountered altitude sickness in Peru, it has pretty much remedied itself overnight.
When we do travel to Peru, our tour goes from Cusco to Machu Picchu, which is only about 8,000 feet which makes a big difference in terms of altitude sickness in Peru.