iOS 10 has changed the process a little to block messages:
1. Go into the message
2. Click the "i" in the upper right
3. Click the number the message was sent from
4. Scroll to the bottom and select "Block this Caller"
This blocks all phone and text messages from them.