What is a .sh file?
This is a Bourne shell script . They are used in many variations of UNIX-like operating systems. They do not have a "language" and are interpreted by your shell (interpreter of terminal commands) or, if the first line has the form
they will use this particular translator. Your file has the first line:
#!/bin/bash
and that means that he uses the Bourne Again Shell, the so-called bash. This is for practical purposes a replacement for the good old w.
Depending on the translator, you will have a different language in which the file is written.
Keep in mind that in the UNIX world, this is not a file extension that determines what the file is (see How to execute a shell script).
If you come from the world of DOS / Windows, you will be familiar with files with the extensions .bat or .cmd (batch files). They are not similar in content, but similar in design.
How to execute a shell script
Unlike some dumb operating systems, * nix does not rely solely on extensions to determine what to do with the file. Permissions are also used. This means that if you try to run a shell script after loading it, it will be the same as trying to "run" any text file. The extension ".sh" exists only for your convenience, to recognize this file.
You will need to make the file executable. Suppose you downloaded your file as file.sh , then you can run it in your terminal:
chmod +x file.sh
chmod is a command to change the permissions of a file, +x sets the execution rights (in this case for everyone), and finally, you have the name of your file.
You can also do this in a graphical interface. Most of the time, you can right-click on a file and select properties, in XUbuntu, the permission settings look like this:

If you do not want to change permissions. You can also force the shell to execute a command. In the terminal you can run:
bash file.sh
The shell should be the same as in the first line of your script.
How safe is it?
It may seem strange that in order to execute a file you need to complete one more task manually. But this is partly due to the strong need for security.
Basically, when you download and run a bash script, this is the same as someone tells you: "Run all of these commands in sequence on your computer, I promise that the results will be good and safe." Ask yourself if you trust the party that provided this file, ask yourself if you are sure that you downloaded the file from the same place as you thought, maybe even look inside to see if something looks inappropriate (although this requires that you know something about * nix commands and bash programming).
Unfortunately, apart from the warning above, I cannot give a step-by-step description of what you should do to prevent evil things from happening to your computer; so just keep in mind that every time you get and run an executable from someone who actually says, “Of course, you can use my computer to do something.”