A process in an operating system goes through various states during its lifecycle:
New: When a process is first created, it enters the 'New' state. The operating system performs initialization and allocates memory for the process.
Ready: After initialization, the process moves to the 'Ready' state and waits in the ready queue to be selected by the CPU scheduler.
Running: When the process is assigned to the CPU and is executing, it is in the 'Running' state. A process can only be in this state when it has the CPU.
Waiting: If a process needs to wait for a resource or event (such as I/O operation completion), it enters the 'Waiting' state until that event occurs.
Terminated: Once a process completes its execution or is killed, it enters the 'Terminated' state. The system reclaims all resources allocated to the process.