A CCSD high school teacher is accused of having a sexual relationship with his student during which the two exchanged nearly 20,000 sometimes explicit text messages, according to police records.