The fan does work on the air, increasing the kinetic energy of the air molecules. Additionally, the motor generates heat. Both effects lead to a slight increase in the temperature of the air in the closed room.