For example:
http://www.boatingsf.com/ais/how-ais-works
How Real-Time Ship Tracking Works
The AIS System
The ship tracks shown on our San Francisco Bay ship tracking page come from a system called AIS (Automatic Identification System). Since 2002, all new commercial ships over 300 gross tons, and all new passenger vessels, have been required to include AIS transponders. The requirement for existing ships has been gradually phased in.
The AIS system transmits information encoded on two VHF channels, at 161.975 MHz 162.025 MHz. Transmissions use 9600 bit per second GMSK FM modulation and HDLC packet protocols. Each ship transmits during one of 2,250 time slots, so all ships can share the two channels. The two channels provide redundancy and some level of protection from interference. Transmission range is basically line-of-sight, like VHF voice traffic. Typical range is 20 nautical miles.
The AIS transponder receives information from the ship's other navigational instruments. Position, course, and speed over ground information is typically provided by a GPS receiver. Additional information can be provided by other instruments. The ship's officers must enter information such as ship name, ship type, ship dimensions, and estimated time of arrival. This information is not always entered correctly and is sometimes out of date, which accounts for the peculiar information occasionally seen in the ship information panel on our ship tracking page.
Ships that are moored or at anchor are required to transmit their position information at least every 3 minutes. Ships moving at up to 14 kts must transmit their position every 10 seconds; at up to 23 kts, every 6 seconds; and at faster speeds, every 2 seconds. In addition, static information (such as the ship's name, destination, and estimated time of arrival) is transmitted separately every 6 minutes.
Read more at http://www.boatingsf.com/ais/how-ais-works#b56Ur2iiMSYd7UXg.99