Events in Node.js are actions or occurrences that happen in the system, such as completion of an operation, failures, or occurrences of errors. Node.js has a built-in module called “events” where you can create, fire, and listen for your own events.
To include the built-in Events module, you need use `require(‘events’)` syntax.
For example:
```
var events = require(‘events’);
var eventEmitter = new events.EventEmitter();
```
EventEmitters emits named events that cause Listener functions to be called. For example, a `net.Server` emits an event each time a peer connects to it, an `fs.readStream` emits an event when the file is opened.
To fire an event, you can use `eventEmitter.emit(eventName)`. To listen for an event, you can use `eventEmitter.on(eventName,callback)`.
```
//Setting up a listener for myEvent
eventEmitter.on(‘myEvent’, function() {
console.log(‘myEvent has occurred!’);
});
//Emitting myEvent
eventEmitter.emit(‘myEvent’);
```
In the example above, “myEvent” is the name of the event, and the second parameter is a callback function that will be invoked whenever the event fires.
Node.js is very much built around events. It’s key to understanding how to use Node.js effectively. Most Node.js core modules such as `HTTP`, `net`, `fs` etc. have certain events that it can emit, and takes a callback function that will be called when those events occur. This is the basis for Node’s non-blocking I/O model.