The term is also used regarding military organizations.
Entity at the top of a corporation to take full responsibility for the overall success of the corporation, ensures Corporate Governance. Corporate headquarters are a key element of a corporate structure and cover different corporate functions such as strategic planning, corporate communications, tax, legal, marketing, finance, HR, IT. The corporate headquarters include: CEO as a key person and his support staff such as the CEO office and other CEO related functions; the "Corporate policy making" functions: Include all corporate functions necessary to steer the firm by defining and establishing corporate policies; the Corporate Services: Activities that combine or consolidate certain enterprise-wide needed support services, provided based on specialized knowledge, best practices, and technology to serve internal (and sometimes external) customers and business partners; the Interface: Reporting line and bi-directional link between corporate headquarters and business units.
The tac (short for tactical) headquarters is a small collection of staff and communicators. Usually very mobile, they exist to allow the Commander to get forward in an operations and command the key parts of it from a position where they can see the ground and influence their immediate subordinates.
The main headquarters is far less mobile and is often involved in both the planning and execution of operations. There are a number of staff assembled here from various staff branches to advise the Commander and control the various aspects of planning or the conduct of discreet operations. A main headquarters will usually have a Chief of Staff who coordinates the staff effort.
The rear headquarters is some distance from the battle or front line in conventional operations, its function is to ensure the logistical support to front line troops, it does this by providing medical, material, equipment & combat supplies by vehicle to where they are most needed.