Magic of attracting matchsticks

TDIY0012

What type of reaction is responsible for converting non magnetic to magnetic material in the DIY activity?
  • N MAGNET
  • MATCHBOX RED AND BLACK
  • WOODEN STAND
Take red and black both matchsticks and see if they are attracted to the neodymium magnet. Burn them and see which one of them is now attrected to the magnet.