Can submarines be refuelled or resupplied under water?

I’m not aware of a procedure or system in place for full resupply of a submarine whilst underwater. Maybe there is one, but I’ve never heard about it.

What submarines do have is lockout chambers that allow you to leave and enter a submarine while it is submerged. They function somewhat similarly in principle to airlocks on a space vessel. Basically there’s a door between the chamber and the rest of the sub, that can be closed and made watertight, so people go into the chamber, the door is closed behind them. There is another hatch in the chamber that opens to the outside, that is also water tight. Then the chamber is filled with water and allowed to equalize pressure with the outside, then you can open the outside door and swim out. There are also escape hatches on submarines, and part of submariner training is training for “escape scenarios” where you learn how to potentially escape a submerged submarine and get to the surface if necessary–note that that is only realistically possible at certain depths. If you’re at 800ft deep or something it probably isn’t happening.

The most common use of lockout chambers is for special forces, Navy SEALs can run special operations out of a submerged submarine where they egress the sub while it is underwater and do whatever it is they are there to do. There’s also a sealed “box” near the tower of the submarine that will contain additional special operations gear–it is more convenient for them to store it outside and access it that way than to lug it all through the lockout chamber out the hatch.

So obviously in a very theoretical sense, you could send divers down with supply parcels and have them go back in through these same means, and in theory resupply a ship. However going in/out while submerged isn’t the most convenient or fun thing to do, it’s slow and difficult. The hatch isn’t that big, so you’re going to be moving VERY small payloads in with each transfer. That’s why I say very theoretical sense, I do not think it’d be a standard way of supplying a sub underwater.