Google Interview Question

Explain the CAP theorem and its consequences?