Its easy to opt out of unsolicited credit card offers. The FTC explains the process on their page.
Call 1-888-5-OPTOUT (567-8688) or visit www.optoutprescreen.com and do it there. The whole process on the website can be done in a few minutes. Below I give the step by step process for opting out.
Step #1: Go to the Opt Out Prescreen site:

Step 2: Click the button at the bottom.


You could also chose to opt out via mail permanently if you want. That process requires you to print out and mail a form in.
Step 4: Fill in the form with your information:

You have to give your name, date of birth, social security number and address. You'll also have to fill in the random security code at the bottom.
Step 5: You're done and you should get a confirmation to print.
The confirmation has the notice at the top :

It will then list your name and other information for reference. Print out the confirmation and keep it for your records.
It will take a few days for the opt out to get processed by the credit bureaus. After that the credit card offers should stop within weeks. If at some point you want to opt back in then you can repeat the process above but choose the opt-in option in step 3. Opting out via the website lasts for 5 years. So you will need to renew the opt out again in 5 years.