I know its some sort of execution, but what takes place and what is the cultural history behind it?
The mazzolatura was a type of capital punishment which was proper to the Papal States (along with hangings, quarterings and, from the early 19th-century on, guillotine) during which the condemned was made to place his/her head upon a block of stone in order for the executioner to bludgeon it with a hammer. The article on Wikipedia argues in favour of it being performed until 1870 but the claims made by the piece's alleged sources seem dubious to me, seeing that David Silvagni's work ^1 doesn't record such a later use and that Mastro Titta - a Roman executioner active in the early/mid 19th century - was notorious for either quartering or beheading the prisoners under his care.
Not only was it an incredibly cruent method but also - perhaps unsurprisingly, given the fact that the Roman society of the time was quite violent - rather popular among the masses, for executions used to be regarded as an occasion for social gathering in pretty much the same way a market or the hostaria (pub) were.
^1 La Corte e la Società romana nei secoli XVIII e XIX (Tipografia del Senato, Roma 1884).