There are a wide range of types of buoys, meeting needs which range from basic navigation to the collection of scientific data. In all cases, it is typically against the law to move a buoy or to moor to it, unless the buoy is a mooring buoy, designed specifically for this purpose. Mariners also report buoys which have gone astray or come unmoored as a courtesy to other boaters and to ensure navigational safety.
Sea marks are navigational buoys. A number of types of buoys fall under this heading, including can and nun buoys, which are used to mark the right and left sides of a navigational channel. Can buoys are green, marking the right side of the channel, and they will be marked with odd numbers. Nun buoys are red, marking the left side of the channel, and they are marked with even numbers. In addition to these basic navigational buoys, it is also possible to find safe water markers, indicating that a passage is clear, along with special purpose buoys, which are yellow and typically have warning information. Other types of buoys are used in navigation as well: preferred channel markers are either red or green on top, indicating which side of the channel has preference, and range markers are used by ships to orient themselves.
There are also a number of types of buoys which are designed for scientific purposes. Sonobuoys, for example, gather acoustic data, which means that they can also be used in anti-submarine warfare. Weather buoys collect data about temperatures, wind, swell, and so forth for forecasting, and tsunami buoys look out specifically for conditions which could indicate an incoming tsunami or severe storm surge.
Buoys are also used to mark navigational hazards like shoals and rocks, in which case they may have lights, bells, or horns to make sure that mariners are aware of them in inclement weather. Special marking buoys may also be used to indicate hazards such as sunken ships. In areas with lots of sea ice, markers can be used to indicate a clear channel through the ice; these markers also warn people on the surface of the ice about holes in the ice which could be dangerous for them.
Divers use several types of buoys for safety. When divers are underwater, they fly a buoy with the classic diver's flag, a red field with a white stripe, and such a flag may be flown from a boat with divers as well. Divers may also use other buoy flags to indicate that they may be stopped for decompression, alerting ships to the fact that people are underwater, and they should stay clear.
Militaries also use several types of buoys. Buoys can be used to identify mine fields, for example, along with potential hazards like an area in which a military exercise is taking place. Buoys are also used in submarine warfare, to track subs and transmit data, and to mark out territorial waters. You may also see specialized buoys used by fishermen to identify things like lobster traps and underwater nets.