If you don't want to receive any message from a given number, just reply STOP (all capital letters, no spaces) to any message received from the given number.
The sender won't then be able to send you further messages. He/she will not be notified of any of their attempts to do so.
To unblock a number, send START.
- Go to the Inbox and open the conversation thread you have with the contact
- Tap the 3 vertical dots in the upper right of the screen
- Click "Block" or "Unblock" and confirm