system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How are electronics "grounded" on spacecraft?

...and what happens "electronically" when 2 spacecraft dock? are the isolated from each other?
gpt
"Grounding" in electrical circuits just means a reference point, to which everything else can be connected.

For example, in a car, one side of the battery is connected to the car's body/chassis. This provides a convenient way to complete an electrical circuit. So, if you want to connect a headlight. You don't need to connect 2 wires - one taking current from the battery to the bulb, and one taking the return current from the bulb to the battery. Instead, you can just use 1 wire to take current from the battery to the bulb, and the return current can go via the car's chassis.

The same principle is used in marine craft, aircraft and spacecraft. The metal structure serves as a convenient method of connecting multiple things together to allow circuits to be completed. If two spacecraft need to dock, then the bodies can be electrically connected together to form a single "ground" zone covering both craft. Each craft retains its own electrical system, but the two systems share the same reference point. 

For land based stationary applications (buildings), then the ground itself (which is electrically conductive) can be used as a convenient reference point, and as a failsafe method of carrying current in the case of an electrical fault. The ground itself isn't a very good electrical conductor, so it isn't usually used to carry current under normal conditions for energy efficiency reasons (but this is sometimes used in very rural areas, where a remote house or farm needs a long power line, but only a small amount of power, making it too expensive to run 2 wires on the power poles - in this case, you can just run a single wire, and use the ground as the return path).