With the standard programs of the iPhone, it is not possible to block a number. However, there are several approaches for dealing with unwanted phone calls on your iPhone. Some apps provide services that block known spam and prank callers. Some cellular carriers offer a blocking service for an extra monthly fee. In addition, you can set up your phone to play a specific ringer, such as a silent ringer, whenever a certain number calls.
While cellular companies typically cannot block specific individual numbers from calling you, some companies do offer solutions. For example, AT&T provides a service known as Smart Limits for $5 per month as of 2011. This service is designed to protect children and keep users from exceeding their data or voice limits, but it can also be used to block up to six phone numbers. Verizon and T-Mobile offer similar services; however, Sprint does not provide this type of service as of August 2011.
If you simply want to block general known spammers, prank callers and telemarketers, you might consider downloading an app, such as iBlackList, MobileGate or MCleaner. However, these apps are only available on jailbroken iPhones, and jailbreaking your iPhone voids its warranty. It can also irreparably damage your iPhone's internal software. If you want to risk the damage or already have a jailbroken iPhone, you can purchase, download and install one of these apps from its own website. For example, you can obtain IBlackList from iblacklist.com.br for $12 as of 2011. These apps have an extensive database of numbers which you can opt to block, or you can choose to block specific numbers in your contact list.
One of the best solutions for blocking calls is to use Google Voice, which offers free call blocking, as well as several other features. To sign up for Google Voice, visit google.com/voice. Fill out your information and sign up for a Google number. You can't get the call-blocking service by using the "light" version -- the version that works with your existing phone number. When you have an account and get a call from a number you want to block, log in, check the box next to the number, click "More" and select "Block Caller."
If you don't care about actually receiving the call and simply don't want to be bothered by the ringing or wasted time, you might consider creating a silent ringtone for contacts you know are spammers. You can download a ringtone-creating app on your iPhone, such as Create Ringtones! or iRinger, or you can play 30 seconds of silence in GarageBand and turn this into an app in iTunes. When you have the ringtone, you can assign it to a specific contact by opening your contacts app, tapping the contact and selecting "Ringtone."