Sometimes you need to block certain phone numbers (eg. marketing persons) to avoid getting calls, messages or emails from them. In case you want to unblock some contacts or just take a look at the list of all blocked numbers, you can do that from any of the native iOS app like Messages, Mail and FaceTime.
The iPhone can list all the blocked contacts and you can unblock them just in case if you change your mind. Have a look how to check blocked contacts on iPhone.
iOS provides an option to filter Spam messages using SMS filter. However, if you need to avoid Spam calls, then you have to block that number. After a contact is blocked, you will not be notified of any calls or messages from them. And, you can easily view the list of all blocked contacts on your iPhone from any app like Messages, Mail, FaceTime and Phone.
To view the list of blocked contacts from Messages, go to Settings->Messages. Scroll down to the section titled SMS/MMS and tap Blocked Contacts.
In the new screen, you can see the list of phone numbers and contacts you have blocked.