In the mid 3rd century BC Rome had conquered all the other states of the Italian peninsula, and looked abroad to the islands of the Mediteranian for further conquest. But those islands were subjects states to the city of Carthage of North Africa. Carthage was a Phoenician colony located about where modern Tunis is today. The Phoenician's had a naval and seafaring tradition that dated back to antiquity, having sailed a fleet around Africa in 600 BC, having been the naval arm of Xerxes during his invasion of Greece, and having been the naval arm of Egypt for millenia.
When the Romans bumped into Carthage the Romans had almost no navy, and no experience fighing naval battles. Their largest ship was the trireme, with three banks of oars, and they didn't have many of them. The Roman trireme was no match in numbers, size, speed or armament to the Carthaginian quinquereme, with five banks of oars. But the Romans didn't know how to build the larger more advanced vessel. Then one day a storm wrecked a Carthaginian quinquereme onto an Italian beach, and within two years the Romans had a fleet of 120 of quinqueremes.
The Romans still didn't know how to fight a naval battle, but they knew hand to hand fighting on land. In the first battle with the new Roman navy, in 260 BC, the Carthaginians were confident of victory. They bore down on the Roman navy and were surprised by two new inventions and a new tactic in naval warfare. Using newly invented grappling hooks and boarding bridges, the Roman lashed the attacking ships to their own, boarded them, and converted the battle to their forte, a hand to hand mellee. In one battle the Carthaginian mastery of the sea was overthrown, and the Punic Wars began.