Grammar is the system and structure of a language or of languages in general. In other words, it’s the collection of principles defining how to put together a sentence.

A common contemporary definition of grammar is the underlying structure of a language that any native speaker of that language knows intuitively. The systematic description of the features of a language is also a grammar. These features include  the system of word formation (morphology), the ways in which words can be ordered to create meaning (word order, also referred to as syntax), which are the main focus of grammar. Some definitions of grammar also include the sound system  phonology (phonology),and how words create meaning (called semantics).