The planes drop sonar buoys, into the water, and the information, from the buoys, is sent back to the aircraft.
I’ve been seeing people all day on these forums who’ve never heard of a sonar buoy. Submarine hunters being aircraft is obvious.