So I want to install a program on my Linux machine and I have no clue on how to install programs that download as tar.gz files I currently install all of my programs via that app repository with the sudo.apt get command, and the build in app store in the ubuntu UI and if I learn how to install the programs from the tar.gz files it would really help me learn how to use Linux a bit more
you don't.
Tar.gz files can contain anything. whether it be files for a Theme or actual software. to unpack it you can just use an archive manager if you want to use a GUI and like any other Tar or Zip File. now if it's a piece of software that's a whole other story. you have to unpack it, prepare a dev environment, compile it, and install it.
Now from the command line. if you have a tar file in a directory you can just switch into the directory. for example let's say you have a tar file in the downloads folder.
then type
What software? Software usually gets installed from the Ubuntu Software Center (In Ubuntu).
Software you downloaded sounds like its source code that first needs to be compiled (i guess).
you can have a look at websites containing tar.gz files, or zip or svn checkout, git clone from a repository.
Most (like suckless/dwm, xscreensaver, ...) have a repo or give binary and singature for you to verify that the downloaded content is what it should be (not having anything else in the source code).
from there you mostly need built-essential and other needed packages installed. Then you can look at the gunzped+untarred files and mostly use ./configure followed by make or creating a build directory and using cmake ...
Most of the above needed things will most probably be documented either on the website of the source code producer/vendor or in a README file.
gl on building and seeing what you can change/add/configure ;)
cmake isn't always supported. you have to look for CMakeLists.txt, and if it's there, you can use cmake.