If a pirate tells you to swab the deck, get out the mop! A swab is a piece of absorbent material on a stick, like a mop, but it can also be small, like a cotton swab used for cleaning ears.
As a verb, to swab means to use a swab. So if you're a nurse assisting a surgeon, you might swab an incision, and if you're working on crime scene, you might swab the area for clues. On land, a swab is usually a small piece of cotton, but the original meaning of the noun was "mop used on a ship," and for a while it was also a popular derogatory term for a low-ranking sailor.