The microwave cause an electric current to run through the tin foil, which due to the foil being so thin causes it to heat up vary fast which is enough to be a fire risk in it's self. on top of that any pointy bits of the foil (if it's crumpled up for example) can cause sparks to ark across to the walls of the microwave, also a fire risk.
Though it's actually highly unlikely that it will cause any damage to the microwave itself (well unless it catches fire)