RE: Order Header table and Order Line table
I'm not sure if I understand your question.
But order/header is a data model that is used in many places in AX and D365. For example in sales and purchase orders.
The header contains general information such as customer/vendor info, payment terms etc.
Then you have lines for every item that is included in the order. You can check these standard forms to get an idea. An example from the real world would be if you order something from a web shop. Order header contains your name and address. Order lines contain the items that you ordered.
About metadata, here's a definition from Wikipedia: en.wikipedia.org/.../Metadata
In AX / D365 metadata is for example data types, table definitions and forms. Basically all AOT objects which are not x++ code. The system consists of code and metadata.
If you have more questions about metadata, I suggest you start another discussion about it. We should always discuss one problem / question in one discussion. You posted two questions that are from very different areas.