Galvanic isolation
Galvanic isolation means separating two electrical structure from each other. One way to do it is to use a relay, another way to do it is to use an opto-isolator. Also transformer makes galvanic isolation.
Galvanic Isolation Media
A transformer is the most widespread example of galvanic isolation.
An opto-isolator is a very popular method of isolation in digital circuits.
Cross-section of dual in-line package opto-isolators. Relative sizes of LED (red) and sensor (green) are exaggerated.
Everlight EL817 phototransistor opto-isolator in DIP-4 package
Halo TG110-S050N2RL 10/100BASE-TX Ethernet pulse transformer in SO-16 package. Decapped sample on the right.