The pupil left Doncaster's Mallard Primary School, at about 11:40 GMT on Tuesday and was found at the Frenchgate Interchange in the town centre.
Their age and sex has not been revealed by police, who were alerted, or the school, in Balby.
School bosses apologised and said pupil safety was taken "very seriously".
Read more about this and other stories from across South Yorkshire
Theresa Siverns, the school's head, said: "We... have strict policies in place aimed at preventing pupils from leaving the school on their own and detailing what to do if a pupil does leave the grounds."
She said police and the child's parents were informed as soon as the school realised the child had left and staff searched the surrounding area.
"Children are regularly warned of the dangers of leaving the school site," she added.
"This was a most unfortunate event and I'm sorry it happened."
South Yorkshire Police confirmed it had been alerted about the missing child and added: "The child was located at the interchange by staff around an hour later and taken back to school."
A primary school is investigating after a pupil walked out and was missing for an hour before being found two miles (3.2km) away.