If you are trying to enable PHP within your templates, this must be done through the Control Panel, even if you are editing your templates as files.
CP Home / Template Manager : Edit Preferences (beside desired template)
If you are asking how to change the html extension to php for the templates that are saved to files, I’d have to ask why? Perhaps so that your code editor will use the right text coloring? If that is the case, it may be better (for security reasons) to just customize your editor to treat html files as php.