With Drupal, creating links which points to some content within the site or to some external content is quite easy using the in built interface for adding links. In Drupal, links are referred as menus, like in any desktop application. With Drupal interface for adding menus, we are just limited to add menus that points to some already existing content, like a node, or any external site. But when it comes to custom module, we have to add the menus by writing code. To add menus from the custom module, we need hook_menu function.
The hook_menu declares paths created and used by the module.
<?php
/**
* Implementation of hook_menu
*/
function hook_menu() {
$items = array();
$items['mypath'] = array(
'type' => MENU_NORMAL_MENU, // default is set to 'MENU_NORMAL_ITEM'