How does inter-container communication work?

There are (at least) two feature requests related to this: