Definition: A pistol is a handgun - but not all handguns are pistols.
The defining factor that makes a handgun a pistol is a chamber that is integral with the barrel. Semi-automatic handguns have a barrel with the chamber built in, which means they are pistols. Revolvers, on the other hand, are not pistols, because a revolver contains a cylinder that's separate from the barrel and contains multiple chambers.
When it comes to firearms terminology, any gun that is designed to be fired using one or both hands, without shouldering the gun, is a handgun. Legal definitions of the term may vary in certain locales.
The term "pistol" is often erroneously used to describe any handgun, but its definition should preclude its being used to describe revolvers and any type of handgun which does not have a chamber made integral with the barrel.
Types of pistols include semi-automatic, break action, bolt action, rolling block, falling block, and other various action types, and they are often single shot guns. A lever-action rifle that's had the stock removed to become a handgun (like the "mare's leg" used by Steve McQueen in the television series "Wanted: Dead or Alive") would qualify, because its chamber is part of its barrel.
Examples: Many handguns are pistols, but revolvers are not.