Modules in Node.js are sets of functionalities encapsulated in single or multiple JavaScript files which can be reused throughout the Node.js application.
Each module in Node.js has its own context, so it cannot interfere with other modules or pollute the global scope. Also, each module can be placed in a separate .js file under a separate folder.
Modules are used in Node.js to promote the reusability of code and can be easily used in other applications just by including the module’s file path with a ‘require’ function.
The ‘require’ keyword is used in Node.js to include a module in the application. For example, to include a built-in module named ‘HTTP’, you can use the following code:
```
var http = require(‘http’);
```
There are 3 types of modules in Node.js:
1. Core Modules: These are the modules included with the Node.js runtime. Example: HTTP, URL, querystring modules, etc.
1. Local Modules: These are the custom modules created by developers for specific tasks in the application.
1. Third-party Modules: Also called external modules, these are modules downloaded from the npm (Node Package Manager) to use in the application.