Malia Brooks, 32, was arrested Tuesday night by Simi Valley Police. She was placed on paid administrative leave in February, after the school was alerted to the relationship, and resigned June 5.
School officials would not say if the alleged male victim was in Brooks' sixth-grade class.
Brooks was charged with one count of a lewd act upon a child, one count of oral copulation of a person under 14, and three counts of genital penetration by a foreign object with a person under 14 years of age when the suspect is more than 10 years older than the victim.
An attorney for Brooks, Ron Bamieh, said the former teacher had suffered from mental illness.
"We've had her diagnosed and she's in treatment," Bamieh said. "My guess is a lot of the charges precipitated from that illness."
Officials at Garden Grove Elementary School, where Brooks taught since 2004, said until this incident, Brooks had "been evaluated until now as an exemplary teacher."
School officials would not say how they learned of the relationship but assured parents there were no indications of any other victims.
Brooks' bail was set at $2 million and she pleaded not guilty to the charges in Ventura County Court Wednesday.