MPC works by solving an optimization problem at each control step. It uses a dynamic model of the system to forecast future states over a prediction horizon. The control actions are then optimized to achieve desired performance while respecting constraints. This process is repeated at each step, providing a feedback mechanism that ensures optimal performance.