en.wikipedia.org/wiki/Automatic_Identification_System
Basically a transponder system that gives position, ident, speed, heading etc. I’ve seen warships with AIS active…watched Daring manoeuvre on a Thursday war a few months back, but, easy enough to spoof them or simply turn them off!.
There are a few sites that rebroadcast live AIS streams onto the net where they have coverage. One is ‘shipais.com’ another is marinetraffic.com’.