How do you get syphilis and how to get rid of it?

Sexually. Transmission of syphilis occurs via direct contact with an infected lesion during sex. Syphilis can also be spread by kissing or touching a person who has active lesions on the lips, mouth, breasts, or genitals. It is treated with antibiotics, specifically benzathine penicillin g as an injection. Penicillin-allergic patients can use doxycycline.
Sex & penicillin. You get it from having unprotected sex. You get rid of it by getting treated with shots of penicillin.