There are several reasons why he might suddenly be attacking you. They are: You have unknowingly become a stage 4 vampire or a werewolf. There is a bounty on your head.
How do I beat Tolfdir?
Once Tolfdir is down on the ground, use your Staff of Magnus and point it towards the great Eye of Magnus sphere. You'll notice that the sphere will slowly close down, decreasing the power it's emitting. Keep pointing the staff at the sphere until it's fully closed.
Can you kill Tolfdir?
Tolfdir is knocked down and remains incapacitated while Ancano attacks. He will still have his protective barrier, which can be removed by using the Staff of Magnus on the Eye of Magnus.