People most often get syphilis from having sexual contact with an infected partner.