UBS Interview Question

Explain how XGBoost works, and explain the difference between gradient boosting and bagging.