The newt is a major player in one of the book's main pranks, though it's one that doesn't involve Matilda. Lavender catches one and hides it in the Trunchbull's drinking water, and then when the Trunchbull pours herself a glass, the newt comes sliding out. Yuck.
Like most people who find something gross in their food, the Trunchbull freaks out at the newt's appearance. Her loss of composure embarrasses her in front of the school's youngest class: "She was especially furious that someone had succeeded in making her jump and yell like that because she prided herself on her toughness" (14.8).
So, what does the newt do for us? Well, for a start, it shows us the Trunchbull's ignorance. The Trunchbull doesn't even know what the newt is: "she had never seen a newt before. Natural history was not her strong point. She hadn't the faintest idea what this thing was" (14.8). The Trunchbull is Headmistress of an entire school, and she can't even identify a newt. Talk about some serious holes in her knowledge.
The newt's presence also shows that the Trunchbull is scared of some things. She may seem like an impenetrable fortress of a woman (not to mention a total monster), but she is frightened by the sight of an itty bitty little newt. When it lands on her chest (as a side effect of Matilda's telekinesis), she is grossed out and tries to flick it away. In contrast, Lavender isn't scared of the newt at all and has no problem touching it. So compared to a tiny little five-year-old, the Trunchbull looks like a big ol' wimp. The newt exposes the chink in the Trunchbull's armor for everyone to see. To which we say, it's about time.