A former Plymouth, Penn., teacher who had inappropriate relationships with four of her students spoke out in an interview with "20/20" over the weekend.

"I’m glad I got caught,” Lauren Cooper, 32, said in the interview, a portion of which can be seen above. “I went against what I know is right, and I did wrong."

Last month, the former Wyoming Valley West High School teacher pleaded guilty to charges of felony sexual contact and two felony counts of corruption of a minor for "sexually explicit conversations" and inappropriate sexual contact with two other boys, 17 and 16.

Cooper said her crimes were fueled by a desire for attention after her marriage started to fall apart. One of her victims, an 18-year-old student, said he'd begun a relationship with Cooper after she told the teen's sister she thought her brother was "hot."

"He was very, very ... convincing, in terms of making me feel good about myself,” Cooper said in the interview. "It wasn’t so much that I even needed a physical connection. It was just being able to interact with someone who made me feel valued and worthwhile."

Cooper was initially arrested in December of last year and then again in January after she was accused of having sex with the 18-year-old and a 17-year-old. Sex with the 18-year-old was a criminal offense because Pennsylvania law forbids teachers from having sex with their students, regardless of their age.

The 18-year-old told police that he and Cooper had sex twice and that she performed oral sex on him three times.

The 17-year-olds alleged that Cooper performed oral sex on him in a car and that the pair had been texting each other since November, 2013.

Cooper was arrested a third time in January after allegations emerged that she had engaged in inappropriate behavior with two other students.

Prosecutors said she showed one of the victims her breasts in one of the school's classrooms, according to the Citizen Voice.

During another incident at the school, authorities said, Cooper told a student, "all the candy you need is right here."

Cooper was sentenced to 9 to 23 months in prison and she has to register as a sex offender for 25 years once she's released.

In court, Cooper's lawyer told the judge his client, who is still married, has severe emotional problems.