Community emails stop when you leave or turn them off in your notification settings. Calendar invites are different, because the events were copied into your own calendar and stay there after you leave.
If you can still sign in
To stop the emails, go to Settings > Account > Notifications and turn off what you don't want. Each community has its own settings, so change them in the community sending the emails.
To leave completely, go to Settings > Account and select Leave this community. There's an optional checkbox to permanently delete your profile, posts, comments and chat messages.
Leaving cancels any subscription you have to that community.
If you can't sign in
Use the Unsubscribe link at the bottom of the email. It opens a page where you can stop that kind of email without signing in, and Manage preferences there shows all your email settings for that community.
To be removed from the community, or if the email has no Unsubscribe link, contact the community's admin and ask them to remove you. They manage their own membership list, so this is the fastest route. If you can't reach them, contact Heartbeat support.
Recurring calendar invites
These aren't new invites. Accepting the original one copied the whole series into your calendar, and it stays there whatever happens to your membership. Open the event in your calendar app and delete or decline the entire series, not a single occurrence.