Just because you applied for a credit card doesn't mean you're under any obligation to accept it. If the rate wasn't what you expected, the terms no longer suit your needs or you simply found a better option, you can close the account at any time. However, the issuer can start reporting the account to the credit bureaus once the card is issued, even before you formally activate it. Only cancelling the card stops that reporting process.
Instead of the activation number often noted on the front of the card when you receive it, call the customer service number on the back and tell the representative you're closing the account. You also can close the account by writing to the issuer at the address specified on the back of the card -- if it doesn't appear there, it should be on the documentation that came with the card. Online cancellation is another option, although you'll have to register on the website first in order to get to the "My Account" settings where this option usually resides.
Regardless of the method you use to close the account, request that the issuer send you a letter that confirms the account was closed on the date requested. If you don't receive a prompt reply, follow up in writing, detailing the date of the initial contact. Send any written correspondence via certified mail with a return receipt request to provide proof that you asked to close the account and that the issuer received that request.
Some card issuers charge fees to the account that appear on your initial statement, such as an application fee or an annual fee billed in advance. If that's the case, these charges must be paid or waived before you can close the account. If you have never used the card and seek to close it before you've even activated it, the issuer might agree to waive them.