If you fire a gun underwater, and assuming the ammo is waterproof, it just shoots more or less normally. The range of the bullet is very short due to the water resistance. The gun will not blow up from the water in the barrel because the barrel and rest of the weapon is also surrounded by water. Now, if you filled a gun barrel with water and fired it(above water)the possibility of unpleasant reactions increases quite a bit. I don't recomend doing it in any case less than an emergency though.
Don in Ohio