Description

Hooks must be declared in theme.yml like so:

    global_settings:
        hooks:
          custom_hooks:
            - name: displayCustomHook
              title: dislplayCustomHook
              description: Test hook
            - name: displayAnotherHook
              ...
          modules_to_hook:
            displayCustomHook:
              - module_name
              - ps_shoppingcart
            displayAnotherHook
              ...

After this they should be recognised in the admin UI, and you will be able to hook modules onto the hooks. The modules specified in the yml are the ones that will be hooked by default on install, but can be removed.

Then the hooks can be called inside .tpl files, like this:

{hook h='displayCustomHook'}

In this case, the asset content of module_name and ps_shoppingcart will replace the position of {hook h='displayCustomHook'} inside the page.