The words header and heading sound very similar, nevertheless, they refer to different things. Many internet sources consider them equivalent.
Header is a general description of the document which is displayed at the top of every page. For example, most word processor software contain a special feature for inserting text that would appear on every page. The same applies to the footer, which is displayed at the bottom of every page, along with the page numbering.
Heading is the word or phrase that or sentence that explains what the followning part is about. It is written at the beginning of a stuctural part, therefore it is considered a structural element of a document. It clearly indicates the content of the following section.
In legal writing, heading is an important means of arranging the content. Contracts, for example are divided into various structural part, such as articles, sections and clauses. However, contracts very often spell out that headings and titles are not included in the interpretation of the contract, but they are used for explanatory purpuses, at often worded they are used for "convenience of reference".
In conclusion, header is part of the formal arrangement of the page, it does not affect the content, while heading is part of the content of the document.