The Sandman replaces the standard aluminum bat for a wooden slugger with a baseball. This comes at the cost of 15 health.
Using the just the bat to beat people up works like normal but the secondary fire pops out a line drive, hopefully right at his foes.
If an enemy is hit by the ball he will take a small bit of damage, while becoming dazed and unable to attack, only able to move. The amount of time unable to fight is relative to the range of the hit, the farther the distance the longer the daze.
If in close quarters the person struck will only take damage with no stun, but at extreme ranges you will knock the person silly, rendering them immobile as well.
After the Scout hits his ball he can either run over and retrieve it (or any scout's ball), go to a resupply cabinet, or wait 10 seconds for the attack to recharge. If you manage to hit someone with the baseball it will quickly disappear, if it hits nothing it will roll around for quite a while.
The Sandman is also one of the weapons in Team Fortress 2 that can kill opponents directly in-front of the player by taunting with a swing for the fences, it takes quite a while for the taunt's swing to happen though.