Bernadette Smith, who is married, engaged in "sexual activity" with the 17-year-old, who was one of her pupils, in a house and in a public park.
Smith, a mother of three, was sacked from her post as a teacher of history and English at Bannockburn High School, Stirlingshire, after it emerged she had an affair with the teenager.
At Stirling Sheriff Court yesterday, Smith, 35, pleaded guilty to the offence. She was placed on the Sex Offenders Register.
Smith, of Gill Park, Denny, Stirlingshire, admitted a single charge that between September 13 and 20 this year at a house in Cowie, Stirlingshire, and at Callendar Park, Falkirk, she did engage in sexual activity with or directed towards the pupil, kissed him on the mouth and neck, and lay beside him on the bed while partially clothed.
The charge stated this was while she was a person over 18 who was in a position of trust, namely that she was the boy's teacher.
She had been due to appear in court next week, on December 6, but the case was "accelerated" at the request of her defence team.
The swiftness of the move appeared to catch even the prosecution by surprise - Depute Fiscal Laura Wilcox asked for time to speak to more senior prosecutors in the Crown Office and Procurator Fiscal Service to prepare a full narration of the facts.
Defence agent Andrew Gibb, solicitor for the teachers' union the Educational Institute of Scotland, did not oppose the deferral.
Sheriff Wyllie Robertson said the request to continue such a case without hearing a narration was "very unusual", but agreed to the Crown motion. Normally, the facts in a sexual offences case are narrated at the time an accused pleads guilty, in order that social workers can begin preparing background reports and an assessment of the risk the accused poses to other potential victims.
The sheriff continued the case until December 13 for a detailed Crown narration of Smith's actions, and placed her on the Sex Offenders Register.
Dressed in black, Smith, whose bail was continued, smiled and looked confused as she was told by the sheriff clerk she could leave the dock.
Bannockburn High School was made aware of the situation on September 19 after the school authorities were contacted by the teenager's parents.
Smith was asked to attend a meeting at the school next day where she was informed of her immediate suspension pending an inquiry. She verbally resigned, but later refused to confirm her resignation in writing, before being sacked.
Headmaster Tom Black sent text messages and letters to parents, after newspaper coverage and Smith's appearance in court.