See
I want to include chapter numbers with page numbers in Word. How can I do this?
This is called "folio numbering" and is often not a good idea. Read the linked article about the industrial disaster that resulted from using this. However, the link above does tell you how to do it. JimP is correct, this is very much tied into using the Built-In Heading Styles tied to numbering and using styles correctly. Read and implement the links he gave you, especially the first one.