Access URL Parameters in Salesforce

In Visualforce Page:

$CurrentPage.parameters.PARAMETERNAME

In Apex:

ApexPages.currentPage().getParameters().get('PARAMETERNAME');