Create a module to access a 3rd party API and store the keys in the database I am new to Drupal module development, and have searched but haven't found any tutorials or guides on how to create a module to do the following:


Access a 3rd party API via a form 
Store the user API key in the database
Access the API key when the user uses the 3rd party API via a form
    submission


Can someone show me how or point me in the right direction for at least steps 2 and 3?
You can handle the storage and retrieval of the API keys in the database via the Drupal API functions:
variable_set and
variable_get.

To store the key (step 2):

variable_set('mymodule_api_key', $api_key);


To access the key (step 3):

$api_key = variable_get('mymodule_api_key', t('-key not set-'));


Where "mymodule" is the short name of your custom module.

As for a comprehensive example: There are many bridge modules in the Drupal.org repos that connects to an external service using an API and authenticates using API keys. One example of this is Mollom.