Forms are the primary method for obtaining, and acting upon user input in Drupal.
Forms are the primary method for obtaining, and acting upon user input in Drupal. Module developers can use Drupal's built-in Form API to provide a familiar, uniform, and secure user interface.
The API for Drupal 7 forms can be found at Form generation; a quick start guide to creating forms can be found at Form API Quickstart Guide.
For questions about the API that allows to create forms in Drupal, consider adding the drupal-fapi tag to the question.