A module is code that extends Drupal's core codebase by altering existing functionality or adding new features. You can use modules contributed by others or create your own.
There are two main types of modules. Those that come shipped with Drupal Core and those that are apart of the thousands of open source modules approved by the Drupal Association and Drupal Security Team.