First, I am studying Java, but I am still very new to it, so complicated code will go over my head.
When I download a .jar file to say install a mod to minecraft and
You have to do RightClick on the jar file and select open with... then, Choose default program... (i think that's the correct translation for "Elegir programa predeterminado" in spanish). On the Open with dialog select Java(TM) Platform SE binary. If you don't see that option you should search for the javaw.exe in your java installation folder, and select it. Also you should check Use the selected program to open this kind of file
Best regards.