I've been reading Ralph Denyer's book, The Guitar Handbook, and in the section on intervals he states that the perfect fourth can be either consonant or dissonant but it's not explained as how or why. Can someone shed some light on this topic for me and help me understand what is being said here?
A perfect fourth is considered consonant when it appears as an inversion of a perfect fifth, which is itself a consonant interval. This kind of perfect fourth more or less unavoidable in any practical polyphonic arrangement, where the root is often doubled and the fifth is somewhere in between.
A perfect fourth is considered dissonant when it appears as an interval above the root, for example in a suspended chord or a 64 chord. It is the reason why a V64-V53-I cadence must resolve; the tonic chord in 64 position is actually considered an embellishment of V with a dissonant fourth.
There is a psychoacoustic reason for this. Intervals which first appear early in the harmonic series are consonant; intervals which first appear later are dissonant. If you examine this diagram showing the harmonics in order, you'll find that G appears rather early (third harmonic above C) while F natural is nowhere to be found.
This makes the perfect fourth both the most consonant and one of the most dissonant intervals in the series, depending on how it appears in context.
There is a kind of historic flow back and forth.
A very long time ago during the Middle Ages - when parallel organum was way to harmonize - the perfect fourth was consonant.
Later when triadic harmony developed along with counterpoint the perfect fourth was treated as a dissonance that resolved to a third.
Later yet again, in modern time, the fourth is treated as a consonance in different ways. In fact in modern times there is quartal harmony based on fourths rather than thirds.
From an acoustical point of view the fourth can be considered consonant because it has a relatively 'simple' interval ratio.
The take away is: consonance and dissonance are concepts determined largely as a matter of style. This is true of other intervals. You could consider minor sevenths and tritones as consonant in the blues as they do not require resolution and a blues audience doesn't think they sound "bad." It's a matter of style and aesthetics.
A technical music theory aside: when dissonance is mentioned in any context, it probably is good to pair that with concepts of resolution (or similar concepts like consonance or stability.) In other words, simply saying X is dissonant only tells half the picture. It's really important to look at how consonant and stability are regained from, or interact with, dissonance. That dynamic is hugely important in how music works.
In the musical context, the sense of consonance and dissonance also depends on the respective harmonical context.
In the theory of harmony, consonant intervals are defined as at rest and not in need of resolution. On the other hand, dissonant intervals require continuation into consonance.
The fourth counts - considered individually - to the perfect consonances. As part of a four-part major chord, it also appears consonant. eg. G-C in C-E-G-C
If, however, it is placed in a triad as a (chord-foreign) suspended tone, it forms a dissonance: V sus7 (G-C-F)
The fourth must therefore be resolved in the consonant third of the triad.
I'm guessing he's adressing how different musical traditions perceives the perfect fourth interval. In other words, historically the perfect fourth was considered dissonant, but in latter periods it has been considered a consonant interval.