If you get unsolicited text messages or iMessages on your iOS devices, you can block the senders, but it’s not easy to figure out how to do it. Here’s how you can block senders in Messages.
Tap on a thread in Messages. You’ll see the messages, the name of the sender at the top of the screen, and a Details link at the top-right (I’m using a text message from my cellphone provider as an example). The screenshot at the right shows what you see after tapping Details.
Tap the i icon at the right of the sender’s name. You’ll see an Info screen.
This is where the Block feature is hidden; you only see it if you scroll down on a device smaller than the iPhone 6.
Tap Block this Caller to block the person.