Hooks are what that make WordPress plugin development easier for you. There are two hooks available on WordPress – Actions and Filters which make WordPress incredibly extendable.
The main difference between actions and filters lies in what they are used for and how they are declared.
Hooks allow communication between two pieces of code and you can use hooks to find and alter the data that is output. Whereas, actions allow you to add new data and change existing data with the help of filters. You can learn more about them in the Hooks page of the Plugin Developer Handbook.
The WordPress Hooks Firing Sequence! By Rachel Vasquez