Thirty-year-old David Borghesani was a teacher at Whitehall High School.
On Monday, while in court, he pleaded guilty to corruption of minors.
Investigators said Borghesani and a female student were in contact through social media for more than a year.
Borghesani resigned in February.
His sentencing is set for November.
----------
Send a breaking news alert
Report a correction or typo
Learn more about the 6abc apps