Lock nuts are used to hold fixtures securely in place from below. These are used in a toilet chiefly to secure the fill valve in the toilet tank. The lock nut threads onto the fill valve inlet just above where the water supply hose or tube coupling attaches. In order to remove one of these nuts without getting wet, you'll first have to clear out all the water from the toilet tank.
Shut the water supply off for the toilet where you will be removing the lock nuts. To locate the supply valve, follow the water supply line or hose from the underside of the tank to where it meets the supply valve at the wall. Turn the handle on the supply valve all the way to the right to cut the water supply.
Lift off the lid of the tank and set it aside. Press down the handle to flush the toilet. Continue holding down the handle until all the water inside the toilet is gone. Mop up any remaining water with a towel or sponge.
Place another dry towel on the floor underneath the tank. Unscrew the plastic coupling connecting the water supply hose to the underside of the tank.
Locate the lock nut, which is the large plastic nut just above where the coupling was connected.
Remove the lock nut by turning it counterclockwise. You can try removing the nut with a pair of pliers or adjustable wrench. You can also purchase or rent a tool called a spud wrench that is made for removing hex nuts.