what event is hinted at in line 32 (Their hats they swam aboon) and in the poem's final stanza?
This ancient ballad "Sir Patrick Spens" depicts the Anglo/Saxon intense attraction to and curiousity for the sea. While a life at sea was romantic to many, the truth was that it was a difficult, painful, and dangerous life.
As the poem goes, the captain, Patrick Spens, did not want to take the voyage as the moon indicated bad weather and bad fortune. Unfortunatly, away they went. The line you indicate means, when translated, "their hats swam above." This means that the only thing left of the men on the boart was their floating hats.
The ship sank; the men died.