This must be different on different radios. We repair Motorola, mostly UHF but some VHF as well. If you program the radio for a different 'Code' then other radios that aren't set to that Code don't hear you and you can't hear them.
There are many types of radios. Most FRS/GMRS and CB radios are straight FM. Now you can program in depending on the radio one of many "Codes" (CTSS tones or Sel-Call Tones) but if I'm monitoring the channel with a receiver that is not code-squelched I hear everything just fine.
You talk of fixing Motorola UHF.. So I'm assuming those are DMR digital radios.. Now those if you don't have the right "Code Plug" you do not hear. You can have two conservations ON THE SAME FREQUENCY and neither hears the other.. You can share a channel or group of channels under automatic control with dozens of other users and not hear a peep out of the others I have used, Professionally, Such a system.
But the government can still hear you..
Also you need a license to use that kind of radio.
Professionally The "Company" (in my case a governmental agency) had the license, and still does
I also have a Ham Radio license that allows me to use DMR radios if I choose (I do not at this time due to some of the features of DMR I wont' go into there)
I do use D-star in fact I'm listening to a D-Star (Multi-mode actually) net as I type.
Radios for RV-RV use
FRS very short range 14 channels
GMRS somehat longer range same 14 as FRS plus some more GMRS and higher power
There are also some other features of GMRS that are interesting
These are all FM and though you an use tone squelch so you do not hear others. they can still hear you .(Just press the Monitor button before you transmit please if using tone squelch)
CB. even more power and range.. 40 channels and you can use AM or SSB (SSB gives even more range)
I had all 3 of those in my RV.. Plus VHF/UHF ham radio.. originally FM but for the last few years both FM and D-Star.. I now have those radios here in the apartment.
D-Star (And other Digital modes including DMR) have the ability to transmit over IP as weii (VoIP) so of the radios I have here.
One is a "Terminal mode" the radio parts are off. a cable connect it to a $10.00 (when I got it cost way more now) Raspberry Pi Zero W Then wi-fi to my house router and on to the world.. I'm in Davison MI (just east of Flint MI) Net Control is in Edmonton, Alberta, Canada I don't see any overseas calls in the net tonight but I've talked to Hong Kong (Half way around the world) you also talk to the international space station on both VHF/UHF FM and D-star (The Sky is no longer the limit)
You can also talk radio to radio (And I have)
YOu do need a license.. To get a license you first study (books can be obtained from the store atr arrl.org) then Register with the FCC's universal licensing system.. Then find club that is offering testing (Or better yet find a club that teaches a class) and take the test. This can cost up to $15.00.. You will be told if you pass.
If you did you will get an E-mail. once you have that send the FCC $35.00 via the ULS system and you are good to go. DMR radios can sometimes be found for $50.00 or less.. D-Star tend to be $500 or more... My first D-Star was $0.00 (Won a drawing) 2nd one (Hand held) was about 400. 3rd about 200 used (that's the one in the car) To give you an idea of cost.
Straight UHF/VHF FM handhelds start at about 10 bucks (That's a 5 watt Baofeng on Wish.Com)