In mechanical engineering, a valve is a device used to regulate the flow of fluids such as liquids, gases, or slurries through a pipe or other enclosed space. It controls the flow by employing a movable component that either opens, closes, or partially blocks an opening within a passageway.

Valves come in seven primary types: globe, gate, needle, plug (or cock), butterfly, poppet, and spool valves.

A plug valve, also known as a cock valve, consists of a conically shaped plug with a hole perpendicular to its axis. This plug fits into a conical seat inside the valve body, positioned at a right angle to the pipeline.

By rotating the plug, the hole aligns with the pipeline to allow fluid to pass through, or it can be rotated to a position perpendicular to the pipeline to block the flow.

In essence, valves are mechanisms designed to regulate, guide, or manage the flow of fluids (gases, liquids, fluidized solids, or slurries) by opening, closing, or partially obstructing different passageways. Although technically classified as fittings, they are often treated as a separate category.