A scenario is a series of linked episodes or sessions in which some kind of story unfolds. Clasically, D&D scenarios, especially published ones, were referred to as modules, a term from wargaming indicating a scenario that could be plugged into a published game. Scenarios are often called adventures, especially as role-playing games have an action-adventure bias.
Several scenarios compose a campaign.
A scenario is a work of authorial design. Because of the nature of role-playing games, it has an undetermined ending. Generally, a published scenario includes a setting, NPCs, and a fairly linear trajectory. Individually crafted scenarios or less traditional published scenarios may be much more open-ended or even indefinitely defined.