What part of a file name indicates the file type and the program that created it?

The file extension. It comes after the file nice, after the last dot in the name. For example someTextDocumet.txt has the extension TXT for plain text. The program that created it is most likely the default one for opening it.