Many patterns of words exhibit a quality known as cohesion. This means that they form coherent units. Phrases are an important coherent grammatical unit. Words that cohere are cohesive: they appear to act not as individual words but as a single unit, e.g. 'inside out', 'at three o'clock', 'the awful creature', 'has been eating', 'in a traditional manner'. These examples of coherent groups are all phrases, but clauses, sentences and discourses are also, if they are to be effective in communicating ideas and facts, coherent.
At the level of discourse, the reader or listener also needs to be able to link the different sentences and paragraphs (or stanzas in a poem, etc) in a logical way. This is achieved by many linguistic means including graphology, semantics, pragmatics, narrative structure, tone, lists, pronouns, proper nouns, repetition of either logical or similar ideas, use of synonyms, and so on. The analysis of the cohesive qualities (i.e. the coherence) of a text is the analysis of discourse structure.