if we need to create custom module we shoul create folder with a name of our module in directory sites/all/modules/your_module_name. Then inside this directory we should create two files your_module_name.info your_module_name.module. In the first file .info we should paste code given below:
name = Your module name visible in administration interface
description = Module description also visible in admin interface.
package = module package name
core = 7.x
The last line shows that module created for drupal 7.
Then we should create .module file with content we need. All hooks inside this module should be named as your_module_name. Thats all. Then you should enable your module through admin interface. Continue doing Drupal, good luck!