The reaction between iron oxide and aluminium needs a lot of heat to trigger at first. And iron oxide and aluminium can not be lighted directly. So we can use the burning of magnesium ribbon which is easy to be lighted to provide the heat and trigger the reaction. Then the reaction will release huge amount of heat which is enough to continue the reaction by itself.