Wherever you’re coming from is probably much, much lower than Cusco (11,000 feet) or Machu Picchu (just shy of 8,000 feet). Stay there for at least a day or two.
The easiest way to get to from Cusco to Machu Picchu is to take the train to Aguas Calientes (the town located a few miles from the site)