After Balaam starts punishing the donkey for refusing to move, it is miraculously given the power to speak to Balaam (Numbers 22:28), and it complains about Balaam's treatment. At this point, Balaam is allowed to see the angel, who informs him that the donkey is the only reason the angel did not kill Balaam.
Magic is also a topic that’s easily misunderstood, and that so easily gives the wrong impression—immediately conjuring images of goofballs in black robes hanging out at the local mall’s food court, or silly New Age nonsense. Is magic real? Yes, but it has nothing to do with any of these things. It’s sacred, deep, and truly profound.