What exactly is a kernel module? Modules are pieces of code that can be loaded and unloaded into the kernelupon demand. They extend the functionality of the kernel without the need to reboot the system. For example,one type of module is the device driver, which allows the kernel to access hardware connected to the system.Without modules, we would have to build monolithic kernels and add new functionality directly into thekernel image. Besides having larger kernels, this has the disadvantage of requiring us to rebuild and reboot thekernel every time we want new functionality.
Following is the link to the LDP Guide which explains Module Development in detail