The header and footer leverage the Navigation menus that can be configured via HubSpot Settings → Website → Navigation.
Instruction to configure Navigation Menus in HubSpot Settings