Definitions help please: Front window vs Focused Window vs Window title

My apologies for asking such basic questions, but my computer knowledge is basic at best.
In the Macro Group setup section there are a slew of options that refer to "Front Window" or "Focused Window" and I can't figure out (or Google) the difference. What are they and how do I know which is which or when is best to use them?
Also I don't know what the "Window Title" is... I assumed it was the app name in the title bar but that doesn't seem to work. My other guess is that it is the filename that appears at the top of the window in many apps... but that is so dynamic I can't see how to use it.

Thanks in advance

As far as I can see, the options in the Group setup only refer to "all windows" or "focused window". There is no mention in this section of "Front Window". When you change from one Window to another in an App, the "focus" (in effect the front window) changes and that can be used to disable or enable the Macros in the Group.

That is literally what the Window is called and what is written in its Title Bar. So, this Text Edit Window's title is "Test Document.rtf"

And this Keyboard Maestro Window's title is: "Keyboard Maestro Editor - Excel"

So, you could use "Available when a focused window's title is" Test Document.rtf to only make a Group of Macros active if a Window with that exact title is at the front, or "Available when a focused window's title contains" .rtf to make the Group only Active if the front document is an .rtf document. There are many options to give you flexibilty.

I would add that I haven't ever made much use of this function in Groups as it is so specific. In 99% of cases, I leave as "Available in all windows".

An easy way to think of it is that every running app that has one or more documents open has a "Frontmost" document window. The currently active app's "Frontmost" document window is also the "Focused" document window (the frontmost window of the frontmost app!).

While these are often the same in practice, it can be useful to refer to the "frontmost" window of a different application without making it active. Totally made up example -- if you had a web app that took a while to do some processing and when finished changed its window name from "Processing..." to "Finished!", you could have a macro action "Pause until front window of Safari, title matches 'Finished!' and carry on working in Word, whose active document would be the focused window. That way your macro could pause and resume as appropriate while you get on with other stuff.

Thank you! A great tutorial from you both that makes it all crystal clear.