On most machines, you should be able to open a file by double-clicking it.
Your computer chooses which program to open a file with by using the file extension. The file extension is the part of the file name after the dot. For example, ninja.jpg is a JPEG image file, and your computer will look up which program handles that kind of image.
If the file has no extension, it will not know how to open it. First, check that your computer is set up to show file extensions. There is more information on this here.
To add or change a file extension, right-click on the file to show the context menu, then select “Rename.” Choose the correct extension for the file type. (Don’t try to add a “.txt” extension to an image file, for example.)
If the file name does have a file extension, it may be that your computer either doesn’t have the right program installed, or hasn’t been told what the right program is. It will usually tell you this when you try to open it, and allow you to pick from a list of installed programs. You can also right-click on the file to bring up the context menu, and choose “Open With” to choose a program.
“Open With” is also useful if you want to open a file using a different program to the one your computer chooses by default. For example, .htm files usually open in your web browser, but you may want to open them in a text editor to change the code.