It uses the device's speakers to emit an inaudible signal that's then detected by the mics when it's reflected back to the device – a little like echo location that bats might use. The audio signal is outside of human hearing range so you shouldn't notice or hear anything.
The aim of the system is to let the device know whereabout you are in the room and if you're close or far away. Google says that it will be able to detect if you're within 4ft (1.22m) of the device and then it can change the display accordingly.
For example, if you're close to your Nest Hub then a cooking timer can be in a fairly small size – but if you're across the room, then you'll want it to be larger. The same logic applies to weather and details of your commute. It's this sort of thing that ultrasonics are going to offer on the Nest Hub devices.
When it comes to media controls, you'll get touch controls appear when you're close to the device – but when you're not there, there's no point in showing those controls as they are just visual clutter.
With the Nest Hub Max there's also a front camera, which can use Face Match to serve up personal results when it recognises you. These will still remain, but ultrasound sensing can now alert those who aren’t face matched or those using the smaller Nest Hub to pending notifications when they're near their device.
The ultrasound sensing will be on by default, but if you want to do so, you can find the settings in your Google Home app and turn off the feature. Additionally, if you use the mute button that turns off the microphones, this will also turn off ultrasound sensing.