"Over-The-Air" or "Broadcast" television refers to Television that is propogated from a broadcast television over Radio Waves between 52 and 600 MHZ which puts this in the very high frequency (VHF) and Ultra High Frequency (UHF) spectrums and are line of sight propagation (typically placing the signal at 40-60 miles from the broadcast tower.
Legally speaking, radio frequencies are "public commons" and are thus owned buy the government, similar to territorial waters vs. international waters (because no one lives Under The Sea but the law of the government encompasses them, it's a common trust managed by the government). Since there are only so many radio frequencies at any one time, and it's line of site the government will licenses corporations to use specific channels (granting them a "right of way"). However, because it's the government's radio station and you're just using it, in order to get those licenses, you had to meet some rules requirements and regulations.
Typically, this is what is permissible to broadcast (You must have so much time devoted to news, so much time to educational programming, and cannot say certain things before a certain point in time called "Watershed" in the U.K. From 2100 to 0530 and "Safe Harbor" in the U.S. from 2200 to 0600. All times are military time.). Other restrictions (at least in the U.S.) include rules that limit some channels so they don't accidentally overpower each other. Typically this is achieved by alternating broadcast areas over even number channels and neighbor regions will be given odd number. In addition to changing which of the 10s you use and blocking out the 30s completely (in North America, the 30-40 range signals are reserved for radio telescopes).
For example, when I was growing up I was in the Baltimore Broadcast area, and because of station location, was able to get signals from Baltimore affilates and some D.C. affiliates as both were within the 40-60 mile range (it's 40 miles as the crow flies) as a kid, ABC was 02 for Baltimore and 07 for DC, so neither signal covered each other. (other double affiliates were Fox (05 in DC and 45 in Baltimroe) and PBS (26 DC and 67 Baltimore (and because of placement, 22 in Annapolis.) This lead to the weird thing where if you wanted something different on PBS and it was a clear night, 22 and 67 would have the same show, but 26 might give you an option. Unfortunately Pledge week was pledge week.).
This problem does not exist in cable or satellite (Dish) because the way the signals are sent are over infrastructure that is not publicly owned or in the "commons". The cable company may contract with a city or municipal government to lay down their lines, but the city doesn't own the line, the cable company does. Satellite will own the satellites that beam the signals down to the receiving dish.
Now the question becomes why Cable or Dish programing aren't more naughty or risque and, well, back when it was new, it was a major selling point for the consumers. You could put all the swearing and nudity on that as well as movies where you might have to cut the naughtier scenes. But when you're making a television show, up until relatively recently, your goal was to get onto a Broadcast network that wasn't PBS (traditionally, the big three are ABC, CBS, and NBC. Fox (not Fox News) was the "fourth" with WB (now CW) being the 5th. A sixth in the form of UPN did exist, but it was folded into WB to make the CW and no longer exists and even in its heyday, was really a dumping ground for syndication shows that wasn't cable.
Getting your pilot picked up by the "Big 3" networks (Or Fox, once X-Files was a hit and later WB/CW) was the goal for all TV productions so while you could make seedier content for cable, until very recently (the late 00s or early 10s) cable wasn't where you wanted to be. That said Game of Thrones and Breaking Bad could not exist on Broadcast.
Now again, there was "Safe Harbor" but there were two problems... You had one hour before each network went to the Nightly News (2300) so you had 7 hours a week to get it in (and nobody wants their show on Friday or Saturday). From 2330 until about 0130 it was late night talk shows (With a "late show" followed by a "late late show") and after that was normally the sign off for a few hours until the morning, usually 5, which is when the farmers got up and they needed some market and weather info, so it was the AM news... though these days, there's more profit in infomercials selling the wee hour viewers miracle knives and exercise equipment they won't us.
Suffice to say, you had a very narrow window... what's more, unlike the UK, which has earlier "Watershed" and uses it, the U.S. also has 6 time zones to the U.K.'s one, and Safe Harbor is based on local time (otherwise it would be 2200 in New York, 1900 in L.A. and 1700 in Hawaii, 1800 and (if you want to get technical about it) 1400 tomorrow afternoon in Alaska (Technically the part of Alaska west of the dateline are still Russian and nobody lives there, but Alaska time is so wibbly-wobbley that even Dr. Who won't go near it.). So the rule is broadcast is according to local time so. NYPD Blue famously got it's network into trouble for showing naughty content in Safe Harbor on the East Coast... but U.S. TV normally gives the time at 10/9 Central (and Pacific) which means it wasn't Safe Harbor the next time zone over and thus net some hefty fines. Cable/Dish only recently broke through this by writing shows that were sold only to channels that would air the naughtiness on cable and just happened to net that network a lot of attention, but it's too little too late as most viewers are "cutting the cord" and ditching cable/dish for streaming services which they pick up ala carte for specific shows and ditch if there is nothing on until the next season of favorite shows can come on.
All this stacks that even on cable and dish, and even on Cable, the big shows that get talked about are still keeping in relatively tame taboos because most writers are still just now branching out of comfort zones to put some more adult material in their shows... And some shows (especially legacy shows that survive a jump from safe TV standards to no rules) will still have the expectation of lacking some obscenities from fans (Don't expect Patrick Stewart to swear like a sailor in Star Trek: Picard, one of the few naval traditions that didn't make it to Starfleet).