The 27th Amendment prevents members of Congress from granting themselves a pay raise or other change in compensation without the consent of the American public. Rather than allowing a change in pay for Congress to be enacted immediately, the 27th Amendment stipulates that another election must take place before the change in compensation takes effect.
According to the U.S. House of Representatives, the purpose of this amendment is to ensure that Congressional members do not give themselves a pay raise without first allowing their constituents to vote on the matter, at least indirectly. The National Constitution Center theorizes that legislatures were likely to be more cautious about granting pay raises to congressional members if the members voting on the increase were potentially unaffected by the outcome. The amendment took 200 years to pass, finally being ratified in 1992.
The 27th Amendment only controls how a raise for members of Congress is implemented. It does not control pay increases for Congress due to cost of living adjustments, also known as a COLA. According to Laws.com, COLAs allow for Congressional members to receive an instant increase in pay that correlates to inflation. Inflation occurs when the cost of living increases because the value of money has decreased. The website notes that the Supreme Court has thus far refused to entertain cases concerning the right of Congress to collect COLA increases in salary.