Zafars
You called this thread 'PLC Basics' and yes this is a really a basic question. I can't believe you actually asked it.
But to answer you question, the task of the input and output modules is to allow the PLC to communicate with the outside world (outide of the PLC).
Input modules report the state of the switches, push buttons, proximity switches etc to the PLC.
Output modules are used by the PLC to turn various things on, e.g lamps, solenoids, motor starters etc
Paul