I am wondering if when writing a chord progression, all the notes fit within a single scale.
If not, what is the logic behind chord progressions?
In your average chord progression, most of the time all of the notes will stay in the scale that correlates with the key of your song. If the song is in G major, your chords will contain notes that are found in that scale- G major, C major, D major, E minor, A minor, B minor.
When you find a chord in a progression that contains some note that is not part of your original scale, it is most likely from a "related" key. This term refers to keys that are a perfect fifth away, in both directions, from your original key.
Let's continue to use G major as our original key: A perfect fifth up from G is D and down is C. You will sometimes see the chord A major sneak into a G major chord progression. This chord is taken from the key of D major. The same with an F major chord. F is sharp in the key of G major, but is natural in the key of C major. Usually these chords lead in a certain direction when used in a foreign key (In the key of G, A major would resolve to D major; F major would resolve to C) but they do not have to.
Another set of related keys from which you can borrow chords are relative majors/ minors and parallel majors/ minors. The relative minor key uses the same key signature as the major key it is derived from (G major and E minor). However, using the harmonic minor mode of the minor scale gives us a raised seventh scale degree. In E minor, D would become D# allowing us to use a B major chord.
Parallel minors/ majors are simple: G major's parallel minor is G minor; E minor's parallel major is E major.
In the rock song Creep by Radiohead, the key of the song is G major; the chord progression is G major-B major-C major-C minor. This progression repeats throughout the entire song.
If you are interested in going further down the rabbit hole, you can also use parallel and relative major/ minors derived from the related keys as well. I hope this is a good resource for the logic behind chord progressions.
That's probably a much more interesting question than you think it is, with the ever-so-useful answer, "It depends."
I'm going to assume that you're playing Western, common practice music in a pop (Jazz/Rock/R&B/et al) idiom, the sort of music with harmony that harks back to Renaissance counterpoint. Basically, the music you hear on mainstream radio or performed by the cast of Glee.
Under that assumption, the answer is "No." As to the logic?
Consider a good Little Richard chord progression: C F C F C G F C
All of those chords have scale-tone roots (we're in C...) and only have scale-tone pitches in them. Now a VERY common sound in Western music is that G-C transition. That's the dominant-to-tonic transition.
One very common alternative would be to play a series of dominant-to-tonic transitions using what are called "secondary dominants," as you'd hear here:
C A7 D7 G7
The logic in this case is that A7 is the dominant of D, D7 is the dominant of G, and G7 is the dominant of C, which brings us back home.
Mozart did this in his 40th symphony (KV 550), Gershwin did it in "Someone to Watch Over Me"
There's a couple dozen metric tonnes of background info I'm glossing over, as well as a myriad of other Western and non-Western musical styles, each with their own rules and conventions.
Google is very much your friend here.
It depends entirely on the genre, and that is actually one of the defining characteristics of genre.
A very large part of what makes a certain genre sound a certain way is the typical chord voicings used (just triads? are there sevenths? are there ninthes? are there altered upper notes?) and the kind of progressions used (purely diatonic? some tonicization? modulations to IV and V? distant modulations?)