Caramelos de limon (lemon candies), candies of coca, mate de coca and lot of water (at least 2L), or even coca leaves (take some in your mouth to chewish them). The water is especially to avoid headache, but you can then take paracetamol or aspirin (the "soroche pills" they sell seem to contain aspirin). Take it easy the first day, starting with water and candies in the plane and then during the day in Cusco. You won't necessary be sick the first day (even if you arrive by plane), but it is preferable to plan 2days in Cusco at first, or go to the sacred valley (lower altitude). If you plan to go to Pun afterwards, don't forget that it's even higher, if you get used to the altitude in Cusco, continue with coca tea, leaves and candies, and you will be fine!
Last piece of advice, if you do a trek especially in the Cordillera blanca region (Huaraz etc.) don(t climb more than 300 to 500 meters per day, and it's actually better to do down a bit at the end of the day before sleeping (to avoid headache !)
South American Explorers,
956 Enrique Palacios,
Tel: 01 447 7731http://www.saexplorers.org
Open: Mon-Fri: 0930 – 1700 (Weds: 2000); Sat: 0930 - 1300