I just looked it up and found this pdf[0] on some technique for divers I didn't bother to understand, but it contains an instruction (Step 3: Learn to control the soft palate) how to get a feel for this. It's not really nostrils, but I think this is what GP meant.
I'm no professional diver but thinking about it and reading that link, it's really a technique to maintain enough pressure inside the nasal cavity to prevent water from rushing in, achieved by closing the soft pallet then slowly moving air into the nasal cavity as needed to maintain that pressure. So not really closing nostrils (for me at least) just restricting them a bit I think... it still sucks to get water past the nostrils but that can be prevented and it's not something I've really had to think about before. When diving into water or changing depth I have to exhale hard through the nose to combat the surge of water pressure but after that it just happens.
I do it by pushing my top lip up against my nostrils. I look silly if there's someone with goggles on to see me underwater, though. Like an extreme duck face.
Also, it doesn't work well now that I have a mustache.
I don’t know about others but I don’t use my tongue. I can block my nasal passage and breathe through my mouth. I can have my mouth wide open and do this. It must be controlled by some muscle but I don’t know what.
I am pretty sure I am breathing through both right now (trying on purpose to do so). I can definitely feel the breath on my tongue and hold something to my nose and smell it.
Whether air from both places actually goes into my lungs? That, I don't know. So you may be right in that regard? I really don't know. :)
[0]: https://freedivewire.com/wp-content/uploads/2016/11/frenzel....