There is 2 kind of hooks: Action hooks and filter hooks.
An action hook is like a gate or a door in some code, that allow you to run some custom code, in a specific code location. It will be executed or "triggered", when the code that handle that door or gate runs. So it's event based.
Filter hooks are a bit different than action hooks. They are not use to trigger some custom code (not event based). They allow to alter or manipulate some existing code values, as strings, arrays, objects… So filter hooks have always at minima one argument to be manipulated and will always return that manipulated argument.
Create custom hooks in a plugin:
1) For action hooks: do_action() Wordpress function
do_action('woocommerce_my_custom_action', $some_variable, $another_variable );
2) For filter hooks: apply_filters() Wordpress function (where $value
is the manipulated argument)
$value = apply_filters('woocommerce_my_custom_action', $value, $some_variable, $another_variable );
There is a bunch of documentation, tutorials and ressources on internet regarding hooks
Wordpress filter Vs. action
what is difference between action hook and filter hook in wordpress?
Wordpress Coding a custom action hook