how do mobile devices such as laptops, phones and etc, ground themselves?
They don't. As others have noted, they use an isolated and floating, common ground.
It is isolated so it does not expose the user to any voltages, or to any conductors. This is to ensure you don't get shocked from any exposed contacts or circuits. But also, should you put your phone on a metal filing cabinet, for example, no voltage in the phone can be shorted through other devices in the phone and potentially cause a fire hazard.
The ground is floating because it does not tie to Earth ground.
And it is common because the various circuits inside the phone all share a common [floating] ground.
Think about your car, boat or airplanes. There are all sorts of electronics in all of them - especially in aircraft which have an abundance of radio transmitters and receivers, radar and other navigational aids that use high voltages in high current circuits. The rubber tires in our cars insulate the car from the road, and of course, flying aircraft are not grounded to Earth ground. And boat sit in water. Yet occupants, mechanics and service people don't get zapped - kinda important when refueling.
why do some pieces of a laptop pcb make contact with a sheet of metal of the chasis?
It is the same inside all electronics, not just laptops. Inside your PC case, your TV, home theater receiver, etc. there is a "common" ground - typically the chassis, as you noted. Motherboards typically have 5 or 6 mounting points to the common ground, then another ground through every connector. A graphics card is connected to ground through the PCIe slot, through its mounting bracket and screw, and if it requires auxiliary power, through the power cable(s) too. Then the monitor's ground is tied to the PC's ground through the graphics cable. The speakers are grounded to the PC through the audio cables - same with every USB device. They all connect to establish a common (single value/potential) ground.
This common ground ensures there is
NO "
difference in potentials" (AKA "voltage") between the different ground points. When you have different potentials, you can have current flow. This is caused by different distances through different conductors to ground - thus different resistances to ground. When you tie them all together, they all are equal.
Ensuring there is only one "common" ground in any electronics systems is important for safety reasons - especially where deadly voltages are present. But even in low voltage applications, ensuring a common ground also help eliminate or at least mitigate potential
EMI/RFI issues, which can disrupt a circuit completely, and/or cause very annoying "noise" problems in audio and analog video circuits.