In detail.... a typical PLC system.
Inputs that represent the state of a switch or dynamic device (position, pressure, or power on/off) used in conjunction with Boolean Logic or Math to determine the condition or state of an output device.
This input condition is accomplished with voltage or current to indicate the input device state (via wires). Once the conditions stipulated by the solve logic/math (program) dictate change, the voltage or current to an output device are changed, via wires, to accomplish desired results.
Decisions are made based on Boolean Logic or transitional states (math or compares), these decisions are then used to direct new conditions or states.
Field devices such as switches and variable transducers (pressure, length, position, or whatever) are wired to the appropriate input devices (usually called input cards or modules). The program contained in the memory of the PLC (Programmable Logic Controller) examines these input states and then performs the "program logic" to change the state of an output device. This change is sent to an output (another module) that is connected (via wires) to a device (valve, light bulb, or motion device) to change the "state" or "control" some condition.
This PLC "system" usually contains voltage or current power supplies to provide power to input and output devices.