The CAP theorem, also called Brewer's theorem, is an impossibility result for distributed computing. In an asynchronous network that can lose messages, a replicated read/write data object cannot guarantee both atomic consistency and availability even when the guarantee is restricted to fair executions (Gilbert and Lynch 2002, Theorem 1). The letters CAP stand for consistency, availability, and partition tolerance.
Here, atomic consistency requires operations to behave as if performed on a single copy in a total order that respects real-time precedence. Availability requires every request received by a non-failing node eventually to receive a response. Partition tolerance allows communication between groups of nodes to fail indefinitely.
For example, suppose a network partition prevents communication between two groups. Availability requires a write changing the stored value in the first group to complete. A read that begins in the second group after the write has completed must also return. The second group cannot distinguish this execution from one with no write, so it cannot guarantee the consistent result.
The familiar summary "choose two of three" refers to guarantees in a network that allows partitions. If every message is eventually delivered, a centralized implementation can provide both atomic consistency and availability (Gilbert and Lynch 2002, §3.2.2).