This capability is built into iOS and Android, so you don't need any special apps to do this. Each OS works slightly differently, but you do it on an individual number basis. Check out the How to Block Text Messages on Android or iPhone article. We describe each OS and even go into how to block messages in specific apps.