The fan's motor converts electrical energy into the kinetic energy of the air and also generates heat due to its own inefficiency. Due to air friction, the kinetic energy of the air eventually dissipates as thermal energy. Both effects lead to a net increase in the internal energy and temperature of the air in the closed room.