For jet aircraft it’s quite simple, you’ll take-off with inHg, above transition level you fly standard, then during descent you’ll receive the altimeter setting in hPa when cleared to an altitude, so you switch units.
Not sure how it would go when flying VFR below transition level from one region to another, never done that. But I assume that upon crossing the FIR boundary you receive further altimeter settings in hPa so you switch.