Real Madrid beat Manchester City 3-1 with a Kylian Mbappe hat-trick in their UEFA Champions League playoff second leg, earning them a 6-3 aggregate victory and a place in the last 16.