Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
If you're talking about SMS/MMS, no there isn't a way, unless your telco provider will block a number for you.
 
If you're jailbroken there are apps - iblacklist comes to mind, that will block calls, sms and mms.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.