The APS (Avtomat Podvodnyj Spetsialnyj) was developed in the early 1970s as a way to provide greater firepower to Russian frogmen (who had been previously armed with knives and the SPP-1M underwater pistol). It was initially used by Russian armed forces, but has also been sold on the international market since the fall of the Soviet Union.
The APS was intially based on the AK-74 rifle, but several significant changes were made. It fires a 120mm long 5.6mm dart or flechette, which is relatively stable traveling underwater – it uses a smoothbore barrel and relies on the shap of the dart for stability and accuracy. The dart is fired by a standard (although well waterproofed) cartridge case with powder and primer. The magazine shape is dictated by the long projectiles, and holds 26 rounds.
The rifle uses a gas piston like the AK to operate, but fires from an open bolt. This ensures that the barrel remains filled with water, which is necessary to properly stabilize the projectiles. It can be fired dry above water, but this is inaccurate and causes significant wear to the gun. The trigger mechanism has a selector for semi or full automatic fire, and a collapsing wire buttstock provides some stability.
The APS is by far the most fully developed underwater firearm in use, although it does have shortcomings. The wide magazine profile can make maneuvering in water somewhat difficult, and the sights are simple and crude.
Because of increasing water pressure, the APS perform differently at different depths. As one submerges farther, the cyclic rate of the weapon slows down and the muzzle velocity and effective range decrease. At 5m depth, the APS is considered to have an effective range of 30m, decreasing to 11m at a depth of 40m. This change in pressure also necessitates a self-adjusting gas system, to ensure that the action cycles reliably in different pressures. The notion of designing an effective underwater firearm really bring to light a number of interesting considerations not relevant on normal guns.
Small Arms Defense Journal has a good article on Russian underwater guns including the APS rifle and SPP-1M pistol at http://sadefensejournal.com/wp/?p=512.