In the simplest sense, the 4066 contains 4 switches which are similar to relays.
Each switch is governed by its control pin (as you pull it high or low).
The control pins are referenced to ground inside the IC. They do not need a return path. (On the other hand a relay coil does need a return path).
Each I/O pair can carry current in either direction. In other words, input of switch A is interchangeable with output of switch A. Etc.
The 4066 is unusual in having this capability.