It does not work very well. Bullets are made to go through air, not water. Water decelerates them very fast.
You can count on two or three feet of travel of the bullet. Any firearm that cycles is going to do very poorly underwater. Revolvers would be the best for underwater usage as they do not cycle. You can expect excessive wear on your weapons because, again, they are not built for being fired underwater.
The bullet will start out slower due to water being in the barrel and where normally it would still be accelerating it is having to push water out of the way. They are working on underwater bullets which can travel up to 60m underwater.
Which would enable underwater firefights for everyone who brought the right ammunition.