Libuv is a high-performance, multi-platform C library that serves as the 'engine room' of Node.js. While the V8 engine is responsible for executing your JavaScript code, libuv is responsible for everything else: handling the Event Loop, managing the Thread Pool, and interacting with the Operating System for I/O tasks.
The Event Loop is actually implemented inside libuv. It is a semi-infinite loop that orchestrates which code needs to run next. It manages timers (like setTimeout), I/O callbacks, and setImmediate.
Node.js offloads heavy tasks to a background pool. This is libuv's Thread Pool. By default, it has 4 threads (though you can increase this up to 1024) which handles File System APIs, DNS Lookups, Crypto, Zlib
If a developer had to write different code for every OS, Node.js would be a nightmare to use. Libuv acts as a bridge, providing a single, consistent API that works the same way on every platform.