To open a Word document with Google Docs, select File > Open > Upload. Google Docs keeps the formatting including automatic page numbering.

To save a Google Docs document as a Word file, select File > Download > Microsoft Word (.docx).

Notice that you can generate other file types as well.