A programmable logic controller (PLC) is a digital computer used for automation in industrial processes, composed of five main components: a central processing unit, power supply, input/output modules, communication interface, and programming device. The CPU executes control instructions in a cycle, while I/O modules interface with external devices, and the communication interface enables networking with other systems. The PLC continuously scans inputs, executes programs, and updates outputs to ensure real-time monitoring and control.