Ladder diagram is the most used PLC programming language. Main ladder logic elements work like electromechanical circuits, in other words they are virtual relays.
A PLC exchanges information with the external environment through input and output terminals.
Swithces and sensor are connected to input terminals. Output terminals are supposed to control contactors, actuators, lamps, etc.
This video shows how to use a PLC simulation software. The new version is available here.