How the earthing can done in air craft systems, ships
All an earth is, is a common reference point.
Ships are fairly easy, they are big bits of metal and so like cars you use the hull as ground. There is a small complication in that some ships/ocean structures deliberately generate a potential difference between the hull and the sea water to resist corrosion.
Aircraft are more complicated, they are subject to greater electrical fileds, flying through thunderstorms etc and have a lot more complicated electronics on them.
Fundementally though they just employ the same system as your house - all the ground lines are connected back to a common reference point ( a star earth) somewhere in the plane. Great care is taken that all parts of the plane are well earthed/well connected together because a lightning strike on one piece of metal will generate a lot of charge and if the next priece of metal isn't well connected to it there will a large potential difference which can cause sparks and fires.
Separate names with a comma.