Perhaps this will help. Some of the following is re-phrased from Hugill's "Shanties from the Seven Seas":
A shanty was, in general, of two forms - one with two single solo lines and two alternating refrains, and one with a four-line verse and a four-or more line chorus. Of course exceptions are to be found to these two general descriptions.
The first of these two main types was that used for hauling, the second for heaving, although many heaving songs also had a four-line pattern (i.e. Sally Brown).
These two main types can be sub-divided into the following:
I. Hauling Songs (intermittent operations involving sails and utilizing pulling): Halyard or 'long drag' songs (for tops'ls and t'gallants). Short haul or 'short drag' songs (for t'gallants and royals). Sweating-up, fore-sheet, or bowline shanties (boarding tacks and sheets, etc.) Bunt shanty (for stowing a sail on the yard). Hand-over-hand songs (for jibs, stays'ls, and braces). Walkaway or stamp-'n'go songs (braces, etc.).
II. Heaving Songs (continuous process operations, utilizing pushing): Main capstan or windlass songs (for heaving the anchor). Capstan songs (for hoisting sails, etc., by 'mechanical' means, and warping in and out of dock). Pump shanties.
Many heaving songs are in 4/4 time, many of them are shore marching songs, and many not sufficiently camouflaged to hide their shore origins. The shanties that come under the hauling-song group are in 6/8 time, usually less musical than the heaving songs and so "salty" (outright or mildly obscene) that their shore origins have been long forgotten.
Not all the heaving songs are marches, although the first tramp around the capstan was usually a march (taking in the slack of the cable, in other words, heaving the ship to her anchor). At the time of the American Civil War many army marching songs such as John Brown's Body, Dixie, The Battle Cry of Freedom, Maryland, and Yeller Rose of Texas were roared out on the fo'c'sle-head, and the Crimean War march Cheer, Boys, Cheer was used in a similar manner. Apart from the early stamp-around, marches were too fast to be used for the entire job of heaving the "hook". After the slack chain was aboard the shantyman would, instinctively, alter the tempo, and a slower tune like Shendoah or Stormalong would be raised. The quicker capstan songs too were often used at the maindeck capstans for setting sail, when the halyard would be taken to the capstan instead of being handed by the crowd (the sailors).