In linguistics, grammar (From Greek: γραμματική) 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).