A module is essentially a story written for Neverwinter Nights. It is usually a self-contained adventure, although some modules—particularly persistent world modules—span a geographic area of a gameworld. Multiple modules can be strung together into a campaign (for example, the original campaign consists of seven modules), with player characters automatically going to the next module as the current one ends. A module contains all the areas, non-player characters, items, and other objects that make up the story's setting, as well as the conversations and scripts that implement the plot of the story being told. In short, it contains all that a player can see while playing.
The things not necessarily contained in a module are the things a player can do while playing. The core game supplies spells, classes, etc. which normally will be in effect in all modules. Some of these can be altered for a given module (for example, a module can supply a replacement script for a spell, changing what that spell does), but the core game is there should a module builder not want to customize these things. (On the other hand, some modifications, such as defining which spells exist, cannot be done within a module but require a hak pak, while other modifications, notably most things dealing with combat, cannot be done at all.)
Modules can be created with the Toolset, which is included with the Windows versions of the game. The settings of modules can vary as much as the people who make them. While BioWare was bound by their license to use the Forgotten Realms setting, players are free to use any setting desired, even historical (or modern) settings like medieval France, or perhaps just a nameless haunted forest located "somewhere". Some modules are created by a Dungeon Master for their personal use as a multiplayer host, while others are shared, some supporting multiplayer (hosted by someone other than the module builder), others strictly single-player adventures.
Since anyone who has bought Neverwinter Nights can make a module, there have been a large number of modules made (the Neverwinter Vault has thousands of modules available for download). Some of these link into the stories of the official campaigns, but most weave their own tales. Naturally, as there is no central oversight of these modules, the quality varies dramatically, with some being "trash" and others rated more highly than the official campaigns. To help players find the higher-quality modules, the Vault has a hall of fame consisting of a few hundred of the modules with high ratings from other players.
A few BioWare-made modules are included with various editions of Neverwinter Nights in addition to those that make up the official campaigns. Several are just demonstrations of content that was new at the time, though.