create a custom module that sends email according to a custom field in registration page

My site will have many state administrator. I want to develop a module which will check the state entered by user during his registration and then send email to respective state administrator. How to do this? This is my first custom module.

Drupal version: