If you're on an iPhone, open the Messages app and find the conversation that you want to mute. Tap the top of the conversation, then tap More. Tap the switch next to Do Not Disturb.
You can also schedule Do Not Disturb for a specific period of time, or until you leave your current location. Just tap More, then tap Scheduled under Do Not Disturb. Choose when you want Do Not Disturb to turn on and off, or choose Until I Leave This Location if you want it enabled until you leave your current location.
Android users have a few different options for blocking group texts. One option is to simply long press on the conversation and select Block from the menu that pops up. Another option is to go into Settings > Blocked Numbers and add numbers or contacts to your block list from there. Once someone is added to your block list, they will no longer be able to contact you via text or calls (unless they use another phone number). You can alsoblock messages from everyone except your contacts by going into Settings > Messages and enabling Filter Unknown Senders under MESSAGING CATEGORIES