Bernadette Smith, 35, was suspended from her post as a history and English teacher at Bannockburn High, Stirlingshire, on Friday.
She was held by police over the weekend following allegations concerning a 17-year-old student, part of which allege her and the pupil engaging in activity in a public park.
When Ms Smith appeared at Stirling Sheriff Court yesterday, she was driven in the back of a police van to a side door entrance.
Groups of youths also gathered outside the court gates, shouting "Miss" as she was taken inside.
After being held in court cells for nearly two hours she appeared before Sheriff Mark Thorley.
Dressed in a long grey mac, wearing stiletto heels, and looking visibly tired and distressed, she spoke only to confirm her name.
Ms Smith, of Denny, pleaded not guilty to a single offence that between September 13 and 20 at an address in Cowie, Stirlingshire. and at Callander Park, Falkirk, she engaged in sexual activity while in position of trust as the boy's teacher.
It is alleged this involved kissing him and lying on a bed next to him partially clothed.
Her solicitor, Harry Coughlan, said she would be challenging the part of the charge which says she was the boy's teacher and in a position of trust.
Mr Coughlan said: "I appear on behalf of Bernadette Smith. The special capacity is challenged and thereafter she pleads not guilty and seeks bail."
Alison Montgomery, the depute fiscal, did not oppose bail.
But she said the Crown sought an additional condition that she does no approach or contact, or attempt to approach or contact, the boy involved.
She added: "We will also seek an order that she attends an identity parade."
Sheriff Thorley told Smith: "You have pled not guilty and you will be given two dates when you need to return. Bail has been granted but with special conditions."
She will appear next for a pre-trial hearing in December, before summary trial, before a sheriff in January.
In a departure from normal procedure, where accused granted bail are left to make their own way home from court, Ms Smith was driven away in a police van.
As crowds gathered the van reversed down a ramp towards the custody door, and Ms Smith was ushered into the back by two security guards, shielded from view, and driven away.
The park where part of the alleged offence is said to have happened is a 170-acre site in Falkirk, centred round historic Callendar House.