WhatsApp doesn't actually allow you to block a group directly, but the following work around should do the trick:
To block a group or being invited to a group, you may block the administrator of the group. Once you have blocked the admins, they cannot invite you anymore.
You can also exit the group and/or mute it, however this is only a temporary measure.
To Block A Person or Group Member
Now open person chat or private chat with group member. You can also open from "Contacts" tab.
After this, click on chat options menu button (the three dots at the top)
Now click "More" and then select "Block" option.
A pop up box will appear. Click OK to allow permission and that's it.
Muting A Group On WhatsApp
Open the group chat thread in Whatsapp.
Tap on the name of the group on the top.
Tap on Mute.
Pick an option for the time period for which the notifications from this group chat should be muted. ( 1 day, 1 week or 1 year)
Secretly Leave A WhatsApp Group
Turn it off to mute or disable the WhatsApp group. This would make you virtually leave the WhatsApp group secretly without any notification. If you want to turn off the notifications of a specific group, you can do so by going in the 'Group Info' option and selecting the 'Mute' option.