Sounds can be made by vibrating an object. For example, when a drumstick hits a drum, the flexible skin of the drum vibrates up and down. The skin's vibration makes a sound by moving the air above it. When the skin moves up, the air above it is compressed and when the skin moves down the air moves with it and expands. The compressing and expanding of the air produces differences in air pressure. The pressure differences in the air move away from the drum surface like ripples in a pond, creating a sound wave. This is how the drum produces a sound that we can hear.
People use devices that vibrate to make sounds in the ocean. Underwater sound sources can be built in a number of different ways. Some underwater sound sources work the same way as loudspeakers in a home stereo system. They have a speaker that is vibrated using an electromagnet. Other sound sources create vibrations with special materials that expand and contract when electricity runs through them. Still other sound sources work much like a drum being played from the inside.
The following figure shows a basic cross-section of a sound source that uses an internal driver and pistons to vibrate the walls of the source. The driver is an object that compresses and expands. As it compresses and expands, it pushes and pulls the pistons, which in turn deform the walls of the source, creating pressure waves.
The large, round, drum-shaped object about to be lowered into the ocean in the picture below is a low-frequency sound source. It is symmetric, with a second, drum-like surface on the side facing away from the camera. Hydraulically driven pistons located inside the source push on the centers of the drum-like surfaces. Sound is generated by the in-and-out motion of the surfaces at the frequency at which the pistons push in-and-out. This source is designed to be operated while suspended below a ship.
To make sounds efficiently, the height or diameter of the sound source walls should be roughly the size of one wavelength of the sound that is being made. This is why a marching band uses a very large bass drum to make low-frequency sounds and smaller drums to make higher-frequency sounds.