What is Drupal hook
The module system in Drupal is based on hook, which is nothing but a PHP function defining set of parameters and a specific result type. The hooks allow modules to interact with the Drupal core.
The hook_menu defines menu items and page callbacks.
hook_nodeapi() allows modules to react to actions affecting all kinds of nodes. It acts on nodes defined by other modules.
Syntax: hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL)
The hook_form_alter performs alterations before rendering a form in Drupal. One popular use of this particular hook is to add form elements to the node.
Syntax: hook_form_alter(&$form, $form_state, $form_id)
The hook called hook_user lets modules react when operations are performed on user accounts.
Syntax: hook_user($op, &$edit, &$account, $category = NULL)