Most units come with a bracket to hold it in place but there are many different sized windows and walls that brackets attach to.
The most common method is to use the window as support and along with a bar on the top hold it in place.
The brackets come in all shapes and sizes to fit the window and the unit.
Example Window A/C Unit Bracket on Amazon
TopShelf TSB-2438 Adjustable Air Conditioning Mounting Bracket
Brackets give good support to a window air conditioner since they are built specifically for that propose.
They work much like a table and a unit will be fully supported from falling.
If a bracket is bought be sure it matches your window style and A.C unit size.
Angle bars with the pre-drilled holes are often used since they can be cut at the right length and screwed into place.
A combination of a bracket and window bar is what gives the most safety.
Since there are many styles of windows there is no one size fits all.
If in doubt simple be sure to have a good bracket that the unit can sit on.
Be sure the bracket is installed right with good length screws and following the install instructions that come with it.
Always side with cation when installing a unit especially if it is located in a walk way that someone might go under.