In OpenTTD, the headquarters or HQ is the building where all administration of your business is carried out. You can click on a headquarters to open the Transport company, to change any details for your company. The headquarters building is not necessary to build. It costs 60 pounds to build initially (free if the land is already cleared), but the cost for relocating it is 1% of the company's current value.
The headquarters, like your company, will grow larger and upward to show your success as a company (growing bigger as company earns more Performance Rating points). Overall, there are five different stages for the headquarters, starting off as a small building no larger than a house, and finishing as a very tall skyscraper-sized building.
The headquarters also accepts any Passengers and Mail in its later stages that are delivered to it, as well as providing a limited amount of passengers and mail itself. During an economic recession there is only half of the usual amount of passengers and mail.
As the HQ shows your success, it is common for players to build them as centerpieces of the transport empire, usually atop a large, artificial mountain, or on an island in the sea. It is not uncommon to see millions spent on such large areas.
There are various different NewGRFs available if you don't like your HQ design, or it seemingly dwarfed by other buildings in a town.