From an eatlier post (TOAW III, but it still applies to IV):
Two types of Headquarters Icons are represented in TOAW - one is represented with a checkered box and the other by "HQ" (as shown on page 41 in the manual).
The Checkered HQ is typically used to represent higher headquarters - Corps HQ, Army HQ, Army Group and Front Headquarters. They may or may not have units directly subordinate to them, which will show in their Formation Report. In most cases the units assigned to them will be support units (artillery, various engineers).
The standard HQ icon, as designated by "HQ", is most frequently assigned to division and brigade level formations. Units of a division are either directly subordinate to their Division HQ or modelled to demonstrate specific deployment doctrines, advantages or limitations - reflecing in Formation Support Levels (Internal, Army, Force or Free).
Both types of Headquarters may serve several functions:
1. All HQ's provide a supply bonus to adjacent friendly units with which it cooperates (per formation support levels). If Support Squads are included in its TO&E (Unit Report) - it's effectiveness in supply distribution is measured according to the number of Support Squads it has in relation to what it is authorized to have.
2. Frequently, HQ's will include Command Groups in their TO&E. In these cases, HQ's also serve a Command & Control function. HQ's that are attacked and lose its command groups may be force its entire formation into reorganization - effective in the next turn.
3. Frequently, HQ's will include artillery in their Unit Report. In such cases, HQ's serve the same role as a unit with the artillery icon - providing combat support to cooperating units within the range of its artillery. It is useful to examine the types of artillery present as the range of each type of artillery may vary.
4. HQ's also frequently include engineering assets. In most cases, the engineering ability of a HQ will be less than a regular engineer unit, owing to number of assigned engineer squads. Railroad repair and ferry engineers may be present further expanding their engineering capabilities. Where present, and where really needed, HQ's can apply their abilities to build bridges or use its ferry engineering ability to help units cross a river - reducing movement costs.
5. HQ's may include military police squads. These help reduce the costs of movement of units through overstacked hexes.
In addition to these possibilities, HQ's have "Rear Guard ability". Units moving out of a hex within an enemy Zone of Control (i.e. adjacent to an enemy unit) may suffer a "disengagement attack". However, you can use a HQ to move into the hex you want to evacuate, move the first unit out and follow it with the HQ, and both units will avoid the disengagement penalty. The important note on this is to ensure that a) the HQ has the movement points needed to get back to a safe area, and b) that the HQ is the last unit to evacuate a hex and that it moves directly into a hex with a friendly unit.