A vector clock is a logical timestamping mechanism where each process in a distributed system maintains a vector of counters, one for every process, to capture causal dependencies between events. When a process experiences a local event, it increments its own counter; when it sends a message, it includes its entire vector. Upon receiving a message, a process updates its vector by taking the element-wise maximum with the received vector, thereby merging causal histories. This allows the system to definitively determine if one event happened-before another, a relationship formalized by Lamport's happened-before relation, enabling causal consistency without a single global clock.
