Syphilis is primarily transmitted through direct contact with syphilitic sores, which can appear on the external genitals, vagina, anus, or in the rectum, lips, and mouth. It can also be transmitted from an infected mother to her baby during childbirth.