inter-process communication
Two people in separate, soundproof offices cannot just talk across the wall, they need an arrangement: a shared whiteboard between the rooms, notes passed under the door, an intercom, or a fire alarm that simply means 'something happened'. Processes are exactly like those isolated offices: each has its own private memory and cannot read another's. Inter-process communication, or IPC, is the set of mechanisms the OS provides so that separate processes can nonetheless exchange data and coordinate.
IPC mechanisms fall into two broad families. In shared memory, the OS lets two processes map the same region of physical memory into both their address spaces, so once it is set up they communicate at full memory speed by reading and writing that shared region, but they must then synchronize carefully to avoid stepping on each other. In message passing, processes do not share memory; instead they send and receive discrete messages through the kernel, which copies the data, simpler and safer but with copying overhead. Common concrete forms include pipes (a one-way byte stream, classically connecting a producer to a consumer, as in command1 | command2); sockets (two-way channels that work both between processes on one machine and across a network); and signals (tiny asynchronous notifications, more 'something happened' than real data transfer, for example to ask a process to stop).
IPC matters because the whole point of separate processes, isolation for safety, also means they cannot casually share state, so any cooperation between them must go through an explicit, OS-mediated channel. Choosing among the mechanisms is a real trade-off: shared memory is fastest but pushes the burden of synchronization onto you; message passing is easier to reason about and works across machines but copies data. One caution: shared memory by itself only provides the shared region, it does not coordinate access, so without separate synchronization two processes writing the same shared memory can corrupt each other's data.
In a shell, 'ls | wc -l' connects two processes with a pipe: ls writes its output into the pipe, wc reads it from the pipe and counts the lines. Neither process shares memory; the kernel carries the bytes between them.
A pipe is message-passing IPC: one process's output is another's input.
Shared memory gives you the shared region but not coordination. Without separate synchronization, two processes writing the same shared memory can still corrupt each other's data.