When Jefferson was president, he had problems with pirates. His sailors would be impressed by the British. This means sailors were kidnapped and forced to work on British ships
You have been impressed sailor!
The Americans also faced a different threat at sea. The pirates of Barbary Coast constantly preyed on ships in the Mediterranean. They would capture the sailors and hold them for ransom.
Get on the ship. You are only going back home once your country pays us
The Americans, who were sick of paying tribute to the Barbary States, bombarded Tripoli with their cannons.
One of the ships, the Philadelphia, was captured and held for ransom. Rather then let pirates take control of the ship, Stephen Decatur, the captain, led a raiding party into the Tripoli harbor, and set the ship on fire.
Although the threat from Barbary Coast was over, the British and French continued to attack American ships. Jefferson then proposed an embargo, which halts trade with and from the US.