Window air conditioners, just like central air conditioners, cool by taking in indoor air from your home. This air is passed through a filter and blown across coils filled with cold Freon. The heat in the air is absorbed by the Freon, and pumped outside, where the heat is dispersed, and the Freon is returned indoors to absorb more heat. If a window air conditioner is running on a table indoors, it cannot vent the heat to the outside, and is not doing anything to cool your indoor temperature.
Window air conditioners also work to reduce indoor humidity. Humidity is the measure of moisture in the air, and a high humidity can make a room feel warmer than it is. Window air conditioners accumulate humidity on their Freon coils, and drain the water into a condensate pan, which drips outside the home. Running a window air conditioner on a table will result in this water simply pooling and being returned to the room through evaporation.
Window air conditioners are constructed in such a way that, when properly mounted in a window, the accumulated condensate safely pools at the back of the unit and drips outside. Sitting a window air conditioner on a table will not give it this angle, and will result in water returning to the front of the air conditioner, and possibly causing damage to electrical components.
A window air conditioner creates some heat, just as a function of compressing the Freon and operating electric motors to run the fan. When installed properly, this heat is insulated in the part of the unit that is outside the home, and safely dispersed outside. If you run a window air conditioner inside the house, this heat will actually increase the indoor air temperature, creating the most expensive and least energy-efficient space heater in history.