2-way valves are pretty simple and straight-forward. A 2-way valve is any type of valve with two ports: an inlet and an outlet port, typically labeled “A” and “AB” respectively. 2-way valves are used in many applications, from basic on/off to more complex variable flow applications with pumps and VFDs. The type of valve you need for an application depends on the amount of flow, the degree of control, shut-off, and pressure drops over the valve.
3-way valves have, yes, three ports, labeled “A”, “B”, and “AB”. Port “AB” is common to the “A” or “B” port. 3-way valves are commonly found in constant flow/volume pumping systems and can be either mixing or diverting valves. 3-way valves can be piped in the supply or return. If in the supply, then a diverting valve is used. If piped in the return, a mixing valve is used. Ball valves can be piped to be mixing or diverting, but globe valves require different bodies for mixing or diverting.
Mixing applications have the 3-way valve configured with two inputs from the supply piping and one output to the return piping, thus mixing together two inputs before sending it out. Mixing valves are most commonly used with modulating control but can be on/off.
Diverting applications have the 3-way valve configured with one input from the supply side and two outputs to the return piping. In general, diverting valves are more expensive than mixing valves.