Sidescan sonar uses sound to produce images that are analogous to aerial photographs of the seafloor. The images need to be interpreted and if you have the right technology you can stitch the images into a large mosaic which makes producing a map much easier.
Conventional systems run in the $40 thousand to $120 thousand range, but it is possible to make systems yourself for much less.
The system requires an electronics package which consists of a signal generator/receiver (typically a piezoelectric transducer) attached to a towfish, which is towed behind the vessel as it plows through the waves.
I have been using a Humminbird 1197c fishfinder, the transducer of which I have attached to a homemade towfish in order to add stability. The Humminbird is designed to run mounted on the transom, which is fine for small inland lakes and still waters, but is not suitable for marine operations.
The towfish is a 3" ABS pipe with wooden fins, held on by copper strapping. The transducer is the small black object on the bottom at the end of the coiled black cable. The fish is towed by a rope which is attached at a towpoint on the top near the front (we don't tow it by the electronics cable, although that is done on commercial systems). The rebar wired onto the front is to provide weight at the front and forces the fish down to a depth where the upward force of the rope balances the weight.
The copper strapping gives it a nice Victorian look. The screws were all hand-tapped, just like in the 19th century.
Old-time marine sonar, 1875. Image from Physics Today (don't recall the issue).
The system is being a little like a laser pointer that flashes in a series of straight lines across the seafloor, making one measurement in each instant, and later reconstructing all of the images into a coherent image. Now if your laser pointer is attached to a ship which is pitching and rolling all over, then instead of tracing out parallel lines on the seafloor, the laser pointer is going to illuminate the seafloor more or less randomly and the resulting image won't make sense.
The towed fish will tend to be more stable. At depth the wave amplitude is smaller and the data are less noisy.
Here is what the seafloor looks like illuminated by sonar.
For this image, the "colour" is related to acoustic reflectivity. Harder substances appear lighter in this image, so the dark background material is relatively soft silt. The sand bodies have dunes (the ripples). The image is about 90 m from left to right. Shoreline is to the right.
This image shows bedrock exposed at the seafloor. On the left side, the bedrock has been covered by fine sediments. The blocky structure within the bedrock reflects foliation in the bedrock (metasediments and metavolcanics). The bedrock surface is very rough with high (up to 2 m) peaks of bedrock, with acoustic shadows visible behind them.
Joining the images is very difficult with this system, but there is one advantage. The system is cheap and robust enough to use in the surf zone. I know of no commercial system with this feature.