“Pop! Goes the Weasel” is an English country dance.
Of the different meanings of the word weasel, the most commonly used today is as the name of the small carnivorous mammal. Weasels do pop their heads up when disturbed and it is quite plausible that this was the source of the name of the dance. Alternately, 'popping' is a slang term for pawning and Weasel may be derived from cockney rhyming slang 'weasel and stoat' -> 'coat', therefore "Pop goes the weasel" may mean pawning your coat since the phrase is preceded in each verse by "that's the way the money goes".
The dance was popular enough in early 1853 for a Mr. Moutrie, in Bath, to have considered it worthwhile to place an advertisement in the Bath Chronicle, offering "instruction the the highly fashionable dances" of 'Pop Goes The Weasel', 'La Tempete' and 'Coulson Quadrille'".
A newspaper advertisement by Boosey and Sons in 1854 suggests that Queen Victoria was influential in the popularity of the dance:
    "The new country dance 'Pop goes the weasel', introduced by her Majesty Queen Victoria."
The dance didn't have lyrics as such. It was a jig and "pop goes the weasel" was shouted out at significant points to accentuate the dance. More recently, it has become a children's nursery rhyme and singing game. The verses are sung at random and some are made up on the fly. The repeats are not used when singing.
It has a Roud Folk Song Index number of 5249 and was printed in Karpeles & Schofield's A Selection of 100 English Folk Dance Airs (1951). The tempo of the audio sample is their recommendation and is more appropriate for dancing than singing.