What is a Hook?
WordPress hooks are pieces of code that allow you to modify the CMS and add new features to it without tinkering with core files. Hooks make this possible by enabling you to “hook” custom code into pre-defined spots in WordPress.
More About Hooks
Actions enable you to add data to WordPress or to change the way that specific tasks run. You can use actions to create outputs for users and to add entries to the database.
Filters, on the other hand, are used to change data in WordPress. Callback functions for filters can take data, modify it, and return it. When writing a callback function for a filter, the function needs a return to work properly.