External parts are unnecessary as shown in the lower left figure. (Input/Output capacitors are necessary.)
The MOSFET operates as a variable resistor so that the output voltage becomes constant voltage.
The potential difference (VIN - VOUT) × input current (IIN) between the drain and source of the MOSFET is a loss. For example, if the input is 5 V and the output is 3 V, the efficiency is 60%. It is used as a power supply for circuits requiring low noise and output voltage accuracy.
The area surrounded by the dotted line shown in the lower right figure is the IC. It needs three external resistors. The built-in transistor operates as a variable resistor so that IK + IOUT = IIN = constant. As a result, the voltage generated at RSD becomes constant and the output voltage is made constant voltage. But in addition to the output current, a cathode current flowing through the transistor is required. Also, there is a voltage drop at the input-side resistor RSD, which reduces the efficiency. It is used for low-current (~ 20 mA) applications such as switching power supply reference voltage and switching power supply photocoupler driver.