A. To prevent being added to unwanted groups, adjust your privacy settings. Go to Settings > Privacy and Security > Groups and select 'My Contacts' or 'Nobody' to limit who can add you to groups.
B. If you are added to a group you do not want to be in, you can leave the group by tapping on the group name at the top and selecting 'Leave Group'.