The RUST Speargun is an exclusively underwater weapon, used in conjunction with Speargun Spears, to hunt sharks and combat players while diving. It was introduced to RUST with the August 6th 2021 Underwater Update.
Apart from the Torpedos used by submarines, spearguns are the only underwater-specific weapon in RUST.
Spearguns are commonly found from several sources, but speargun spears are obtainable only through researching and crafting, both of which may be crafted using the Tier 1 Workbench.
As alluded to, spearguns and their ammo speargun spears can only fire while submerged underwater, rendering them utterly useless for land-based combat. They function very much like the Crossbow when fired.