The means for opening files has changed over time. You are talking about legacy ways of opening a file, which is still the most common.
The beginning.
To support office you could put in win.ini *.doc=c:\winword.exe.
Asociations are per user and per machine with per user settings overriding machine settings.
In NT/Win 95 it was expanded. So HKCR.ext could hold the open string (\shell\open) for compat with win.ini but more typically poined to a file class, eg HKCR.txt=txtfile. Looking up HKCR\txtfile\shell\open gave you the command.
Due to programs stealing file associations this now has an layer of other associations put over it. So the command is built from above and these newer keys HKEY_CLASSES_ROOT\SystemFileAssociations (which also includes associations for a newer concept of a general type of file - picture or music) or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.
For Word, it was opened using DDE (also specified at the above registry keys) rather than just a command line. That is it was started as a DDE server then had fileopen commands sent to it with the name of the file to be opened
New Ways of Opening Files.
Files are now opened using COM. The program registers IDropTarget under above keys.
Context menu handlers can override the above. They are also registered above.
The best way is to shellexec the file. It will just open like it was double clicked.