what do i have to learn to understand chords in sequence?
Functional harmony. See below. And you can google that too.
why are certain combination of chords in sequence harmonic?
I infer that by 'harmonic' your mean functional. There are indeed ways to sequence chords in such a way to PREVENT listener from predicting what the next chord is going to be. Once you choose not to do that, in order to aid listeners' prediction-making you must write music with some regularity like, 'if this chord is ... then the next chord is ...' or like 'if these chords are ... then the next chords are ...' etc. In academic jargon, some call this regularity chord functions.
Whether or not your use explicitly rules or intuition or whatever to compose, such regularity (i.e. 'structures' or 'patterns') must be in your song, or else your listener cannot predict. Without predictability, so-called 'tension and release' cannot happen, because 'satisfying a prediction' is 'RELEASE'. Not satisfying a prediction is a SURPRISE (or more precisely, structuring your song to allow listeners to predict but also structuring it to make the prediction turning out to be wrong results in the effect of surprise in the mind of the listener; structuring it to make the prediction turning out to be right results in the feeling of closure, or a sense of relief, in the so-called 'tension-and-release' listening experience).
I disagree with your assumption that music must be 'boring if it is a single piece repeating over and over'. It is possible to repeat a single piece with VARIATIONS. What you described as your requirement 'to glue several pieces together to form a whole' is just one way to realize an end, namely CONTRAST; however, do keep in mind that other ways are possible. Variation is repeating AND contrasting happening at the same time. However, I respect your assumptions because that is what make your style possible. You want to 'produce a pleasant song' and your assumptions of what is pleasant is basically what your question is about.
To answer 'why certain combination in sequence' sounds pleasant to you, the perhaps shockingly simple answer is 'because you have heard it before'. Since I am not you, I cannot know what you have heard, but I am going to assume your taste in a way that make answering your question possible (for me): I am going to assume that 'functional' chord sequences sounds pleasant to you.
To answer your question properly (of why functional chords sounds pleasant to you) requires contextualizing your taste in social and historical terms, and that is why other answers here deem your question to be 'enormously deep' . By 'social and historical terms', I mean basically the 'you-heard-it-before' line of reasoning. To see this kind of reasoning in action, see my explanation * of how 'structural aspects of compositions' and 'musician listening in a tradition' interact.
The way of chord sequencing described below is based on the fact that you want to 'glue pieces together to produce a song'. This particular way is one (out of many) possible of solution of the problem of allowing prediction, contrast, variations, release, surprise, etc.
Effects such as release or surprise in the minds of the listeners are, in this theory of chord sequencing, prompted by FUNCTIONS of chords. I will describe these functions (to be named soon) as if they corresponds to certain kind of feelings: feeling at home, feeling a need to go somewhere else, feeling as if in the middle of a journey, feeling at home away from home, feeling having to go home, etc. I assume these feelings are pretty much felt by everyone, and in this theory, I say that sequencing of chords is a METAPHOR for this kind of feelings in sequence.
What makes this metaphorically way of communication work has its basis on 2 things: 1) listener's and composer's common understanding of how we feel when we experience contrast, variations, release (i.e. closure), surprise, tension, etc. when our predictions of what is going to happen gets denied or satisfied or somewhere in between, and 2) a 'vocabulary' of chords recognizable by both listeners and composers. BOTH ARE NECESSARY. i.e. suppose the listener can understand 'going back to the same chord' to metaphorically mean 'returning home'; however, if the listener cannot even recognized that the same chord is finally appearing again, how can the listener use such metaphorical understanding to generate the feeling of at home from the stimuli of hearing what is indeed the same chord coming back again? (no, the listener cannot).
It is possible for you to construct your chords to be so complex that your listener cannot even recognize them. If so, even when you refer to it again (and again), on the listener's part the feeling of at-home (or closure or release) may not result. You cannot really be sure if what you deem simple is boring, and if what you deem complex is exciting, because the listeners (not you) decide for themselves what is simple (thus more predictable) and what is complex (thus less so). For the purpose of answering your question, I assume you construct your chords by stacking thirds, one on top of another.
The musical intervals between what is called the root in this way of chord construction and other musical tones in the same chord determines the QUALITY of the chord (a major 7th chord and a minor 7th chord of the same root can have similar function; what makes them very different is mainly their quality). In some styles described below, the association between quality of the chord and the FUNCTION of the chord is actually quite flexible;
However, the association of chord functions and sequential chord root movements (i.e. assigning meanings to intervals in how your BASS LINE moves -- not necessarily all intervals there but only the musical interval between this-chord's root and next-chord's root -- for all chords in the sequence) below are meant to be very consistent, so that your chord sequence can have enough predictability to be capable of being metaphors of home/journey related feelings (which are not necessarily happy/sad related feelings). This means that in these styles you are quite free to associate whatever chord function to whatever chord quality, but you will still need to do it with some consistency (as constrained by musical scales you use), or else you risk losing your listeners.
If quality and functions of chords are related (but is not the same thing), what do I mean by function here? I will name 3 kinds of functions. These names (i.e. jargon) will be associated with various home/journey-related feelings, also known as 'listening experience as metaphor of life experience'. Their definitions are not precise because feelings are not precise. They are rich with metaphorical power precisely because they are not precise, and yet they are different from each other enough so that they can be meaningful (instead of all being the same, which is not so meaningful).
The functions are: 1)tonic, 2)will-return-to-tonic (i.e. 'dominant' in usual music theory jargon), and 3)will-go-to-dominant-or-back-to-tonic. Following W Benjamin's chapter on Mozart in M Tenzer's book on world music, I name these functions T, D, and S. I throw in a piece of heavy reference here to convince you that SOMEBODY, not me, said there are 3 kinds of chords, just like some others referred to Joe Pass in saying there are 2 kinds of chords.
T is easier to define and you can refer to my definition of tonic * elsewhere. T feels stable or homey, but depending on other aspects of your song like rhythm or melody etc., T can also feel somewhat boring like when you have been staying home for too long because you've been sick, wanting to go elsewhere for a breathe fresh air. D or S is that feeling of fresh air, by providing contrast to T. The difference between D and S is this: D almost always go back to T, so often so that listeners expect it to do so, so that when it does not, it is a surprise to them. S sometimes goes to T and sometimes goes to D, with similar likelihood, so that when it does go to either, there is not much of a surprise. As S goes to T, it feels like arriving home; as S goes to D, it feel like the urge to go home. As S goes to another S, it like you are in the middle of a journey; you are not stuck at home, but it is not like that there is a place you have to go either. D, on the other hand, feels like you have to go home soon. Remember these feelings can vary in strength according to how you sequence your chords. Use your life experience about your home(s) and your journey(s) as metaphors to figure out what sequencing of musical experience may theoretically result in how strong of what feeling.
Now some 'usual' usages first. For the D function, people like Mozart tend to use chords whose root is on the 5th or 7th step of the scale (i.e. 'dominant' and 'subtonic') currently in use ('currently' because they can switch between different scales). They tend to use, as the root of S, the 2nd or 4th step (i.e. 'supertonic' and 'subdominant' of the scale in use). T, of course, is on the first step of the scale. This description of T, D, and S chord functions is applicable to works written with chords from major AND/OR minor scales, by people like J. S. Bach just before him, or since him. To understand how they use chords with root on the 3rd or 6th step (i.e. 'median' and 'submedian' of the scale in use), something else must be explained first.
Things gets interesting when chords function like D of D, D of S, S of S, etc. (D of T is simply D, S of T is simply S). As you can see, this kind of function of function forms the basis of a grammar or syntax for sequencing chords, like how you put together sentences from words, but the syntax is not as rigid as that of, say, English. Like English, in which you have have things like subordinate clauses forming sentences, using the grammar of T, D and S, you can build larger sequences of chords out of smaller sequences of chords. To come up with something like a D of D, say to yourself, this chord must of go to the next chord functioning as if that next chord is T, but when the listener get there, they will find out that it is really a D, ready to return to T. Using this grammar, you can create for example D of D of D or even D of D of D of D too.
People like Bach and Mozart tend to use the relative major scale of a minor scale currently in use (e.g. Eb major scale of C natural minor scale) or the relative minor scale of a major scale currently in use (e.g. A natural minor scale of C major scale), not as an 'area' go to and stay there for while, but as an 'area' to go to briefly and quickly return from (they seem to prefer a new scale starting on the 5th degree of the current scale as the 'area' to 'stay longer' or 'modulate to' -- with many exception, of course). So, for people like Mozart, median and submedian chords tend to end a cadence (a formulaic use of a T-D or D-T or S-T or S-D or S-D-T pattern) that briefly tonicizes the relative major or relative minor, or they tend to be a D of S (in another pattern, like S-D, while that pattern's T is not the overall T). For people like Bach, submedian is used a lot for S function too.
However, Mozart and Bach's way is not the only way to associate chords' roots with functions. For example, in 12 bars blues, the 4th degree of the scale functions as root of D (going to T all the time) and the 5th degree of the scale functions as root of S. In other words, using jargon introduced above, 12 bars blues can be described as associating T, D and S functions to 3 chords on different roots but all in the same chord quality, with T's root on the tonic degree of the scale, D's root on the subdominant degree of it, and with the root of S on the dominant degree of the scale. See a glossary summarizing these 'scale-degree jargon' at the very end of this.
Here my theory shows its inconsistency: this S in blues is not going sometimes to T and sometimes to D, but always to D, so it should be called a D of D, but if I call it that, the root movement of DofD-D and D-T is not the same, unlike in the II-V-I case, making my description of S from analyzing Bach and Mozart inconsistent with my description of the blues by labeling some of its chords as S. Actually, the consistency between all the blues makes acceptable their chord functions, with one function that does not really fit my description of S but which I will call S nonetheless. Why do I do it? To keep the number of 'kinds of chords' down to 3.
This example shows why some people say there are two kinds of chords and some people say three - because you can say that there are more kinds too if you want. It also shows why your assumption of 'there must be a way to say that 3 different chords are likely to form music such that given 2 chords, the third must be X and so forth' is WRONG, because the 'must' which you are looking for is actually derived from the consistency of the songs in a style or a repertoire. Once you take away the assumption of the songs in question being in the same style or repertoire, the 'likely' part of your statement no longer applies.
My theory's failure shows that you can even define your own way of using other scale degree as root of D or root of S, but for that to work you will need to be CONSISTENT in your songs with associating functional meanings to chord root movements. This is harder than you many think, so I would suggest you stick with 'usual' associations between chord function and scale degree of chord root to being with (try Bach/Mozart's root-function associations first).
The QUALITY of chords may also carry functional meaning through consistent usage. The chord quality formed with minor 3rd, perfect 5th and major 7th above the root is consistently used in (a lot of styles of) jazz as T, and the chord quality formed with minor 3rd, diminished 5th and minor 7th above the root is used there consistently as S of S (i.e. as ii° in a ii°-V tonicizing yet another S). Such a description is possible only because there is enough consistency within not only a song but many songs, forming a so-called style or repertoire. You are likely to find exceptions to such descriptions in pieces 'outside the style'. For example, Debussy uses the m7b5 chord quality (i.e. the chord quality just mentioned in the previous example) not necessarily to function the way it does in jazz.
For your purpose 'to learn to understand how to compose several pieces and glue them together to produce a song', listen to and analyze how songs-you-like create chord functions differently in different sections of the same song. That is how you learn to understand how these 'several pieces' (to be 'glued together') need to sequence their chord differently. [I explained the process of doing such analysis * elsewhere]. You will find that SECTIONS to be glued together feels different because the complexity of chord functions and the patterning of chord functions are different in some consistent way among different works within a certain style.
Here is a very vague description of a possible result (of your own analysis). You will need to do your own analysis to arrive at a more useful description because I cannot know your taste in all its details. The following description applies to so-called folk / pop style; For other styles, you will have to find yourself the analogy within the style you like to manage the contrast between patterning of chord functions in different sections.
- In the verse of a song, create a sense of opening (in retrospect) by
limiting the use of composite functions so that when things like D of
S, or S-SDTofD-T, or D of D of D, etc. are introduced later,
there is a feeling of 'opening up' or 'going elsewhere'. One solution
is to use only T in the entire verse, or only T and D, or only T and
S for the almost the entire verse and just put one D somewhere, near
or at the very end of it. Surely you can come up with more solutions.
- In the bridge of a song, create a feeling of transition by using a
long sequence of chords without T. For that to work your chords must
be constantly on the move. i.e. use many different chords. If you
just think of some chord as not T but then just use it again and
again, your listener will make up their own mind and deem it to be T
even if you say it is not. If the scale going into the bridge
and the scale after are of different quality, and/or if they have
different tonics, the feeling of transition or traveling to somewhere
else during the bridge would be even stronger.
- In the chorus of a song, make sure a chord (a T or a D) appear with
really regular regularity between other chords, something like one T
every 4 chords or one D every phrase or something like that. This
regularity creates the 'tourist destination' kind of 'home away from
home' feeling often found in (certain styles within the broader)
styles sometimes known as pop or folk.
These 3 suggestions are based on many assumptions, of your taste, of your melody being in major or minor scale, of your using chords formed by stacked third, etc. By taking away any of these assumptions, the suggestions are no longer so valid; however, the more basic theory of why simultaneous tone combination can be sequenced into metaphor for home/journey related feelings (i.e. the theory of functional harmony) may still be applicable. Use the more basic theory as a basis to construct your own not-so-basic theories!
[glossary: tonic, supertonic, median, subdominant, dominant, submedian, subtonic =
VI, vii, ♯i, II, III,♯iv, ♯v° for parallel maj of relative minor of major
vi, vii°, I, ii, iii, IV, V for relative minor of major
I, ii, iii, IV, V, vi, vii° for major
i, ii°,♭III, iv, v,♭VI,♭VII for minor
♭III, iv, v,♭VI,♭VII, i, ii° for relative major of minor
♭iii, iv°,♭V,♭vi,♭vii,♭I,♭II for parallel minor of
relative major of minor
i.e. tonic chords of major and minor scale are symbolized as I and i respectively; tonic chord of relative major scale (relative to tonic minor) is symbolized as ♭III, and tonic chord of relative minor scale (relative to tonic major) is symbolized as vi: yes, as soon as you say things like a scale being relative to or parallel to another scale, you are thinking in two scales at once. thinking in multiple scales simultaneously is how one theorizes chords of composite function (e.g. labeling this or that chord as a D of S or as a D of D, etc.). there are many other scales, each with different intervalic structures and on different relative scale degrees which result in different root-quality relationships: look for online references through links on my other answer on re-harmonization or just google wikipedia for more about them.]