In the books, he was originally called Speedy and was one of the animals she tried her animal-speaking spell on as part of her third year holiday project. Mildred initially believed that the spell didn't work on him because he was slightly too large for the spell to be a success when all of his limbs were out of the shell, but it turned out that she had actually cast the spell correctly as he met the size requirements when he was completely inside his shell. After saying he dislikes the ironic name "Speedy" Mildred renames him "Einstein", realizing that he can serve as proof that she created the spell rather than Ethel but only if she can present him to a teacher before noon the next day, as the spell has a two-week time limit.
After discovering that Einstein can still speak and overheard the conversation between Ethel and Mildred about the project, and that Einstein only has one more day before the spell wears off and he becomes mute forever, Ethel orders Drusilla to hide Einstein in the hollow pine tree outside the school gates for two days to be on the safe side. Fortunately, Cyril, the toad Ethel had tested the spell on herself, tells Mildred where he is and she retrieves him. It is Einstein who tells Miss Cackle and Miss Hardbroom the truth about Ethel knocking Mildred's bag out of the tree, turning her pot into snakes, and stealing her project and passing it off as her own. At the conclusion of the novel, Mildred is given permission to keep Einstein as another pet once the spell wears off, with his last words being to tell Mildred "I'm glad I belong to you".
He is mentioned in "The Worst Witch and the Wishing Star", but it is explicitly stated that he is hibernating at the start of Mildred's fourth year and is never shown to emerge.
In the 2017 series episode "Tortoise Trouble", Einstein is the demonstration animal for Mildred's animal speech spell, but Ethel steals him and Mildred's research notes on the spell when she overhears him talking under Mildred's bed, leaving him at the top of a tree. Fortunately, Ethel's sister Sybil Hallow and her new friends/roommates find Einstein and take him back to the school in time to expose Ethel's lies. Although there is no indication that the spell that allowed Einstein to talk will wear off, Mildred is unable to keep Einstein at school with her, and he is apparently sent home to her mother.