An air conditioner window unit is meant for either a window or a wall. It's intended for the user interface, intake grille and louvers to face inside, and the exhaust grille and drainage hose to face outside. When the unit is active, air circulates throughout the room. The air within the room is sucked through the intake grille on the lower front of the unit. Moisture in the air is evaporated and exhausted out of the back of the unit while cold air is blown through the vents at the top of the unit.
When installing a unit in the window, you must secure the unit to the window frame and house structure so that it doesn't fall out of the window, which is very important, especially if you live in a crowded area and live more than one story up. You can nail a piece of wood into the ledge outside of the window so that the unit sits on top of the piece of wood when installed. If you screw in two brackets, which are sometimes supplied with the unit, into the piece of outside wood, you can lower the unit's bottom guard bar in between the brackets and the windowsill to further secure the unit.
After the unit is installed in the windowsill, you should lower the window down either behind the top guard or into the top guard. The unit should be level or at the very least tipped back somewhat to allow the drainage water to run toward the back of the unit. To secure the window, use two brackets on either side of the window frame level with the opened window top. Screw a bracket each into the right and left side of the window frame so that the window can't be lifted.
You can use strips of weather sealant to seal up holes or cracks around the unit where air could possibly escape. A roll of weather seal comes with some units. The seal features a paper back to prevent the seal from sticking to stuff. Peel off the weather seal and place a strip on top of the open window to cover the space between the two windows. You might even want to put some on the window sash and sill before you install the unit.