Can anyone explain to me clearly how Major modes and minor modes work
together. Can any minor mode work within any major mode? How do these work
together?
Everything is explained in Chapter 20 of the Emacs Manual.
Depends what Emacs version you use. For versions 24 and 25
it is chapter 23, "Major and Minor Modes". For version 23
it is chapter 27, "Major Modes" and section and 57.1, "Minor
Modes". It is here:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Modes.html
In sum, a major mode is buffer-specific.
As such, it typically does something appropriate for that
buffer content.
A minor mode can be buffer-specific (local) or not (global).
Minor-mode key bindings override major-mode key bindings.
A minor mode can do anything at all. What it does need not
be specific for the content of any particular buffer, and
hence for any particular major mode.