A solecism, in the context of language, is a grammatical error or blunder made when speaking or writing. The word "solecism" can also refer to a social mistake or faux pas.
Solecisms can be classified further into smaller categories, since there are many different kinds of solecisms. Here are some of the most common ones.
A malapropism occurs when someone uses a wrong word when speaking because it sounds like the correct word. If someone says the phrase "the pineapple of perfection" rather than "the pinnacle of perfection," that is a malapropism. The word "malapropism" comes from the character Mrs. Malaprop, from Richard Sheridan's play The Rivals, who often made malapropisms.
Within the category of malapropisms are eggcorns. An eggcorn is a malapropism that is fairly plausible or makes sense in the context in which it is used. For instance, if someone says "for all intensive purposes" instead of "for all intents and purposes," then this could be considered an eggcorn. "For all intensive purposes" does make sense, despite not being the correct phrase.
A mondegreen is an instance of someone mishearing or misinterpreting a phrase, giving it new meaning. If you are listening to a song and you misinterpret one of the lyrics, that is a mondegreen. The word "mondegreen" came about when the phrase "Oh, they have slain the Earl of Moray and laid him on the green" was misinterpreted as "Oh, they have slain the Earl of Moray and Lady Mondegreen" by Sylvia Wright, an American writer.
Spoonerisms occur when certain corresponding sounds in two words are switched with each other, usually the first letters of those words. One example of a spoonerism would be saying "fight a liar" instead of "light a fire."
These are just a few of the many kinds of grammatical errors that exist. Try to avoid these while speaking or writing!