A programmable logic controller (PLC) is a solid-state device that performs logic functions previously done by electromechanical relays. It uses a microprocessor and memory to make logical decisions and control machinery through inputs and outputs. PLCs are programmed using ladder logic and other languages. They are widely used in industry for automation and process control applications.