In linguistics, grammar is the set of structural rules governing the composition of clauses, phrases, and words in any given natural language. The term refers also to the study of such rules, and this field includes morphology, syntax, and phonology, often complemented by phonetics, semantics, and pragmatics.
For linguists, grammar refers to cognitive information underlying language use. Speakers of a language have a set of internalized rules for using that language. These rules constitute grammar, and the vast majority of the information in the grammar is—at least in the case of one's native language—acquired not by conscious study or instruction, but by observing other speakers. Much of this work is done during early childhood; learning a language later in life usually involves a greater degree of explicit instruction.
The term "grammar" can also be used to describe the rules that govern the linguistic behaviour of a group of speakers. The term "English grammar", therefore, may have several meanings. It may refer to the whole of English grammar, that is, to the grammars of all the speakers of the language, in which case, the term encompasses a great deal of variation. Alternatively, it may refer only to what is common to the grammars of all, or of the vast majority of English speakers (such as subject–verb–object word order in simple declarative sentences). Or it may refer to the rules of a particular, relatively well-defined variety of English (such as standard English for a particular region).
A specific description, study or analysis of such rules may also be referred to as a grammar. A reference book describing the grammar of a language is called a "reference grammar" or simply "a grammar" (see History of English grammars). A fully explicit grammar that exhaustively describes the grammatical constructions of a language is called a descriptive grammar. This kind of linguistic description contrasts with linguistic prescription, an attempt to discourage or suppress some grammatical constructions, while promoting others. For example, preposition stranding occurs widely in Germanic languages and has a long history in English. John Dryden, however, objected to it (without explanation), leading other English speakers to avoid the construction and discourage its use.