When you write a PHP function in WordPress
function.php file, there should be a way to call that function to execute. WordPress has something called Hooks that you can use to call your custom-written function
Hooks in WordPress are functions which can be attached to actions or filters.
Before understanding the Hooks we will understand the Actions and Filters.
Actions and Filters are the two types of Hooks you find in WordPress and there are very important when you develop WordPress Plugins