The primary treatment for congenital syphilis is penicillin. The treatment regimen typically involves intravenous or intramuscular administration of penicillin over a period of 10 days. For infants with signs of neurosyphilis, a longer course of treatment may be necessary.