It is very rare that you would encounter a gear problem that leads to flooding of your mask. Smaller seal issues take usually care of themselves. The pressure of the air inside the mask pushes small amounts of water out if the seal is broken. If your mask completely breaks and floods you would try to either use a replacement mask if you have one or to do a safe ascent. There's usually no reason to panic. If it's just a temporary issue where water flooded your scuba diving mask, then try to purge the mask first. You can only do that by looking up and then lift the bottom of the mask slightly and press the purge button of your regulator. That will usually allow air to get trapped inside your mask and push water out. Alternatively, you can breathe out into your mask and purge the water that way. Neither of these methods is foolproof though. The worst that usually might happen is that you have to ascent to replace the mask. Water entering the mask can and will happen even with the best scuba goggles. Be prepared for it and don't panic when you encounter this issue.