Anne Lakey, 55, struck up inappropriate relationships with the pair over a three-year period in the late 1980s, Teesside Crown Court was told.
Caroline Goodwin, prosecuting, said she had committed a "gross breach of trust".
Ms Lakey, from Stanley, County Durham, denies 13 counts of indecent assault.
She is accused of repeatedly having sex with one boy when he was 13 or 14, and another who was 15.
The younger of the boys would go round to Ms Lakey's house while her husband was out, the court heard.
Miss Goodwin said the defendant was a "skilled manipulator" who exploited the boy's "vulnerability and immaturity" and his "natural curiosity" about sex.
"It was their secret. [He] became in a way submissive to her sexual demands. She used him for her own sexual gratification," she said.
"He was a young, impressionable teenager being groomed."
The court heard the boy would visit Ms Lakey when he played truant, and the pair formed a friendship described by the prosecution as "plainly wrong".
Their first sexual encounter happened during a game of dare, which escalated to the boy losing his virginity, Ms Goodwin said.
On one occasion, Ms Lakey rang the boy's school and posed as his mother to explain he was off sick, the jury heard.
They had sex once or twice a week, the prosecution said, until they were nearly caught by the defendant's husband, after which the boy ended the relationship.
He contacted Ms Lakey's school In December 2012, after seeing a blog where she wrote her "raison d'etre was to give young people the best start in life", the court was told.
His e-mail said the teacher was a "disgusting sexual monster" who should not be allowed anywhere near young people, jurors heard.
Ms Lakey dismissed the allegations as "just a fantasy" when confronted by police.
The second alleged victim was 15 when he began to have regular sex with Ms Lakey, the court heard.
This continued for some time, Ms Goodwin said, until "he saw her with someone else and realised he was no longer needed."
The pair recommenced their relationship lawfully when the boy was 17, the court heard.
Ms Lakey told police they had a casual sexual relationship when the boy was 18.
The trial continues.
A head teacher accused of having sex with two underage boys was a sexual predator who exploited her situation, a jury has heard.