A 3-way ball valve is a type of valve with three ports or openings used to control the direction of fluid or gas flow. It features a metal ball inside the valve body, which has openings (ports) to manage the flow. The ball can be rotated using a mechanism to direct the media from one port to another, allowing for versatile control of the flow direction between the connected ports.