A distributed system is a collection of independent computers that appear as a single coherent system to users. Components communicate by passing messages only. Distributed systems are motivated by the need to handle large computations that cannot be handled by a single computer, like those at companies like Google and Facebook. There are challenges in building distributed systems due to lack of shared memory, clocks, and potential failures.