Question: how a voltage regulator works?
Answer: A voltage regulator generates a fixed output voltage of a preset magnitude that remains constant regardless of changes to its input voltage or load conditions. ... It compares the output voltage with a precise reference voltage and adjusts the pass device to maintain a constant output voltage.