Loadable kernel modules (LKMs) allow extending the functionality of an operating system's kernel by loading modules at runtime. This avoids needing to rebuild the kernel for new hardware support or system calls. LKMs can be loaded and unloaded dynamically to add and remove functionality. While convenient, LKMs also present security risks if attackers can load malicious modules to hide processes or files. Operating systems implement LKMs differently, such as through modprobe in Linux or kextload in macOS.