Question: what is the difference between grammatical and ungrammatical?
Answer: If the rules and constraints of the particular lect are followed, then the sentence is judged to be grammatical. In contrast, an ungrammatical sentence is one that violates the rules of the given language variety. Linguists use grammaticality judgements to investigate the syntactic structure of sentences.