The simplest way to look at the TL431 is as an adjustable zener diode. And, like a zener it really does not have an 'output' terminal.
It typically has a resistor divider to 'program' the zener voltage across a wide range. You can connect the ends of the divider to the cathode and anode pins of the TL431 and make a two terminal zener. When the voltage at the junction of the divider is less than 2.5V, the cathode-anode won't draw much current. If that junction voltage is above 2.5V, the cathode-anode will draw current.
But you can also tie the top of the resistor divider to one place, and the cathode to another. This is the typical configuration in many power supplies. The resistors sees the output voltage, and feeds the error signal back to the voltage control loop of the supply.
The TL431 is probably in more power supplies world wide than any other single component.