Many games and other forms of entertainment show the wielder flipping around their pistol and hitting their opponent with the butt. Pistol-whipping or buffaloing in the real world was actually done by striking the opponent with the barrel as using the butt was problematic for several reasons, not the least of which war jarring a pistol quite hard while its pointed at the wielder is creating an increased change of death for themselves. It takes more time to flip the gun. This action can render the gun incapable of firring or reloading, especially it takes grip clips.
Also buffaloing is sometimes used to refer to a tactic pioneered by Wyatt Erp that ended with a pistol-whip. He'd make like he was ready to for a gunfight with his opponent; provoking and trying to intimidate them. He would then look ready to draw with his hand real close to his gun. But he wouldn't draw. Instead he'd briskly march right at the person and get in their face real close. Now they were distracted, and likely confused. Then he'd whip out his gun and hit his opponent with the barrel end. The opponent was starring at his hand or gun waiting for the draw, practically oblivious that Erp was coming closer, until that fact distracted and/or confused them. Obviously some opponents would have not waited for the draw and simple shot whenever, Wyatt Erp apparently never chose the wrong opponent to use this tactic on.