You can prevent the default behavior of an event by calling the `preventDefault()` method on the event object passed to your event handler function. This will stop the browser’s default action associated with that event, such as submitting a form or following a link.