Proper earthing/grounding/shielding of electronics plays two roles
1. Noise reduction and better signal integrity
2. Electrical safety
Starting with the analogy of the coaxial cable that requires a 50 Ohm or 75 Ohm terminator at one end then we can start to understand the problem.
For single rail electronics, the negative rail plays the role of earth. For dual rail electronics, the zero volt rail serves as earth.
If the potential difference between the power supply rails of an electronic circuit are within safe levels for touch and also the power is from a battery or an isolation transformer where the primary coil will never cross with the secondary coil even under fault, then such a circuit may use a two pin A/C connector and have a floating earth. In such devices the ground plane as well as the chassis are connected together.
Where the chassis is exposed to possible electrical connection to other devices either through input earth,output earth or the chassis itself to an equipment rack. With our initial coaxial cable analogy the problems encountered with 10base2 networks come into play. Only one end of a 10base2 network was terminated with a 50 Ohm resistor.
In our audio example we can manage our ground loops by increasing resistance through paths which we dont want currents to prefer. To better manage ground loops and other problems, we terminate at only one point that being between the chassis and the power supply ground terminal. Chassis consists of the enclosure, heatsinks,and the transformer iron core. The resitor used at this termination point can be anything between 100 to 10 Ohms depending on the currents at play. Where we want to create an AC short for certain high frequencies we bypass this resistor with a suitable capacitor between 10nF to 100nF.For electrical safety we also bypass this parallel resistor and capacitor with a pair of parallel diodes each oriented in the opposite direction. These are high current diodes capable of remaining intact while the AC fuse blows incase of a fault condition. These diodes also feature a high forward voltage for higher perceived resistance.
Two pin equipment does not protect the user from external electrical fault that comes into contact with the chassis. For three pin equipment the earth pin is connected directly to chassis. Any dangerous fault will blow the fuse disconnecting the dangerous voltage.
At the circuit level the electronics are mounted with isolating standoffs if using plated holes or holes that do not completely clear the circuit ground plane. Brass or non isolated standoffs maybe used where the mounting holes have no electrical connection with the PCB ground plane. For further noise and interference management the circuit should feature power supply high frequency decoupling capacitors especially across opamp IC power pins. These capacitors work hand in hand with input high frequency filter capacitors. High frequency noise management for PCBs having external inputs maybe further improved with termination at the circuit level between circuit ground and chassis using a capacitor atleast 10x smaller than our main terminator bypass capacitor and a bleeder resistor atleast 10x greater than our main terminator resistor.