An air conditioner takes heat out of the air that runs through it. It has to put that heat somewhere. If it can't blow the heat out of the room then the heat stays in the room. But that's not all. While it's running the air conditioner also uses electrical energy to run. And that generates more heat. So if there's an air conditioner running in a closed room then the room will get warmer.