Congratulations on your endeavor into Linux! In Ubuntu it is mostly as such:
programs or scripts
libraries for those programs
programs you have compiled and installed
configuration for system programs
per user configuration
$HOME is an environment variable containing your home folder, eg.
You will find many other programs putting user configuration files directly in
$HOME, which is not best practice.
Some larger programs like to install in
/opt because it keeps things tidy.
If the installation program gives me the option, and I don't need the program to be available to other users, I will install to
Oh, and one final note: Windows installs files in several locations including
c:\Windows\Program Files\Common Files,
c:\Windows\ProgramData, as well as config files in the users home directory. But worse, is the massive amounts of configuration information scattered all over the registry making program portability nearly impossible.