Ball valves are made with a rotating sphere that has a hole in it. In the open position, the hole in the sphere is in line with the pipe. When closed, the hole in the sphere is perpendicular to the pipe. The lever handle operates the valve, but also serves as an indicator for whether the valve is open or closed. When the lever is parallel to the pipe, the valve is open.
Ball valves do not allow for precise flow control because they usually have positive stops (0, 45, 90 degrees), but they do provide a very good seal in the closed position.