The operating system manages hardware resources like the CPU, memory, storage, and I/O devices by abstracting hardware complexities and ensuring efficient usage. Through techniques like process scheduling, memory management, disk scheduling, and device drivers, the OS ensures that all resources are utilized optimally for smooth system performance.