These used to make the same type of noise and animation as if a player had levelled up. However, as of the 16/01/2012 update, the level-up fireworks have been updated; the Firework item still uses the old graphics.
It is possible to pick up the firework before it goes off, allowing you to take it back in your inventory.
The examine text alludes to the common disclaimer on items hazardous to young children.