the dollar started as a receipt for gold thus its value was the same as the value of gold you could get for it.
over time to finance public works and war the government started printing more dollars and eventually had to give less and less gold per dollar in existence (they couldn't print gold to back up the paper).
eventually in 1971 the government had so little gold and so much paper in circulation that it had to stop redeeming paper for gold altogether.
since then more and more paper was printed the the purchasing power is declining ever since.