This is a warning.
If a warship wanted another ship to stop and the other ship continued on, despite visual warnings, the warship would fire a warning shot from a cannon in front of the other ship (across the bows, the front of the ship).
It was a final warning to stop before the next shot was aimed at the ship itself.