I was wondering if I got syphilis how to get rid of it?

See your doctor. The antibiotic to be chosen and the route of administration and dosage and duration will depend upon the stage of the disease and your ability to tolerate a particular drug. Get treated asap, because late stage syphilis can be devastating.