How do boats communicate with one another?

They have radios stationed in all boats.
Well, there are radios in MOST ships, and many boats. Besides radio, ships communicate with each other by horn signals. There is a standard set of signals that indicate actions that a ship is about to take.