Hooks are the system WordPress uses to let plugins and themes change or add to how the software behaves, without editing WordPress’s core files directly.
There are two main types: actions, which let you run custom code at a specific point, and filters, which let you modify data before it’s used or displayed.
A Simple Way to Think About It
Imagine WordPress as an assembly line with designated stopping points along the way. Hooks let developers attach extra steps at those points — sending a notification, changing a value, or logging an event — without altering the main assembly line itself.
Why This System Matters
Hooks are the reason WordPress can be customized so extensively through plugins. Instead of every plugin developer needing to modify WordPress’s core code, they simply hook into the existing points WordPress already provides — which also means their changes survive WordPress core updates safely.