Obviously, there was no mud/stone monster, but there was a series of events that stopped (at least temporarily) the persecution of Jews in Prague.
What actually happened?
Absolutely nothing.
The idea of a Golem of Prague was an invention of several authors beginning no earlier than the 19th century. The idea that it was an instrument of rescue of the Jews of Prague from persecution originated with Rabbi Yudel Rosenberg, who in the late 19th century wrote Niflaos HaMaharal, the most influential book of stories about the (again, mythical) Golem. He was projecting the insecurities of his own time, in which there was absolutely persecution of Jews, onto the Prague of the 16th century, which could be considered something of a golden age and which had no significant persecution of the Jews which had to be stopped.
I wrote a post about the Golem, with special focus on Rabbi Rosenberg's role in the story, here.