The PLC is a computer running a fixed program (the firmware in the CPU module). The ladder program is converted to bolean instructions and stored in memory.
The computer runs a set of tasks. The main three:
Read Input register. Solve bolean logic. Write to Output register.
This is the main part of a 'Scan'.
Other items are 'Housekeeping' (check for errors, low battery, etc.), communications (Program Port, HMI, etc.).
So, the simplified sequence is Housekeeping, read inputs, solve logic, update outputs, Housekeeping, etc.
Most PLC manufacturers explain this in more detail. Look for information on a 'Scan'.