Once you’re on the Details screen, scroll down and tap On (or Off) the “Do Not Disturb” option. To mute a message thread on your iOS device, first select the message in question and tap “Details” in the upper-right corner. Turning on Do Not Disturb on your iPhone or iPad is a similar process and will yield the same result, which is to say that you will still see that you have unread messages but you won’t receive any notifications.
When you do this, you will still be able to see that you have unread messages because the red number badge will still appear over the Messages icon (if you keep it in the Dock), but you will no longer receive notifications.