Infosys interview question

How does React’s virtual DOM work, and why is it faster than the real DOM?