Registers an event listener for a specific event.
The event name.
The callback function to execute when the event is triggered.