Pergunta de entrevista da empresa onsemi

Explain what a voltage regulator does. What are the differences between a PMOS and NMOS?