A specific type of shutoff valve
Rather than a washer
which grates against a seat
(as in a regular valve), or a sliding metal-on-metal disc which sometimes jams and often doesn't shut off completely (as in a gate valve
), or an exotic swinging disc (as in a butterfly valve
), a ball valve simply has a stainless-steel ball, with a hole bored through it, turned by a lever, arranged between two seats
in such a way that the hole through it either lines up with the pipe connections on either side (permitting fluid to flow) or sits crossways, blocking the flow.
The lever on a simple ball valve therefore only moves through 90 degrees. A ball valve is not much good for throttling;
it's pretty much either on or off. But that's perfect for a shutoff valve; on/off is what you want, and swinging a lever handle through 90 degrees is much easier than cranking down on some other type of valve, wondering if it's ever going to seat fully.
The one drawback of ball valves is that for some reason, the hole through the ball is usually not quite as big as the inner diameter of the pipes the valve is connected to, meaning that, even when it's on all the way, the valve presents a slight constriction to flow. There are "full throat ball valves" which have bigger balls with bigger, non-flow-diminishing holes in them, but these are somewhat exotic, more expensive and harder to find.
There are also fancier kinds of ball valves that can do things like routing fluid from pipe A either to pipe B or pipe C (rather than simply turning a single flow on or off).