Group B strep

I was just notified I'll be getting this swab test next week. What is it?! And does it hurt?! My doctor said they swab the rectum?!! What happens if it is positive?