Lots of generalisations, but...
The switch is usually connected directly to a microprocessor (uP). The uP is powered all the time, even when the radio is off. There are usually several operating modes, including a sleep mode where the power consumed is minimised. Pressing the switch generates an interrupt which 'wakes' the uP up from sleep mode, and it then turns power on (or off) to the rest of the circuitry.
The uP doesn't actually switch the power - that is done by a separate power regulator/control chip. The uP simply asks the regulator to turn on or off. Older designs will be a simple 'on/off' wire from the uP to the regulator. Newer designs may have a digital comunicaiton bus between the two.
So, if it were me, I'd make sure the on/off switch is working correctly, and the on/off signal is getting to the uP. Not much you can do about the uP itself, but if you can find an online circuit diagram for your radio you might be able to find the connection from the uP to the power regulator. The regulator will be quite a large device usually bolted to the metal chassis of the radio. They dissipate a lot of power so get hot. You can sometimes read the part number off them and locate replacements.
Having said all that, if the radio is intermittent then chances are the uP and Regulator are Ok - silicon stuff is pretty reliable and unlikely to misbehave if correctly connected. It'll likely be a switch, crystal, resistor or capacitor playing up.