Queueing theory models systems with queues that form due to demand for services exceeding the system's capacity. It was originally developed to model telephone traffic congestion. Key components of queueing systems include the arrival process, queue discipline, service mechanism, and outlet. Common models include the M/M/1 queue with a single server and Poisson arrivals, and the M/M/m queue with multiple servers. Queueing theory aims to minimize waiting times and costs by understanding the tradeoff between service levels and waiting.