Ted didn't actually come on stage at the Oscars. It was, of course, a bit of TV magic.
Mark Wahlberg was on stage inside the Dolby Theatre next to an empty stool, and his pre-taped bit with the computer-generated talking teddy bear was broadcast simultaneously inside the venue on monitors. That's what people at home saw on their television sets.
When it came to actually handing out the trophies for sound editing, though, that was all Wahlberg in real time.
(Copyright 2013 by The Associated Press. All Rights Reserved.)