Definition
Quoting is the set of shell mechanisms for telling the shell to treat characters literally rather than as syntax. Without quoting the shell performs a long list of expansions on every command line — splitting on whitespace, expanding globs (*, ?, [...]), expanding variables ($var), running command substitutions ($(...)), evaluating arithmetic ($((...))), and expanding history (!). Each of these mechanisms is helpful when wanted and destructive when not. Quoting is how a shell user controls exactly which expansions happen and which do not.
Bash provides three forms. Single quotes ('...') suppress every expansion — the contents are passed through literally, with no exception. Double quotes ("...") suppress globbing and word-splitting but still allow variable expansion and command substitution. The backslash (\) quotes the single character that follows it. The three forms compose, and the choice between them is one of the most consequential daily decisions in shell programming.
Why it matters
How it works
The shell reads each command line, breaks it into tokens at unquoted whitespace, and then runs each token through the expansion pipeline. Quoting intervenes at specific points. A single-quoted region is removed from the input before any expansion runs — the contents become a single literal token, character for character, including dollar signs, backticks, and even other single quotes (which cannot be embedded inside single quotes at all; you must close, escape, and reopen). A double-quoted region is also a single token (no word-splitting, no globbing) but variable references and command substitutions inside it are still expanded — the unquoted equivalent would also split the resulting value on whitespace, whereas the quoted form preserves it as one argument.
The practical rule is to default to double quotes around every variable reference and substitution. Use single quotes when the string contains characters bash would otherwise interpret and you want them all to pass through unchanged — typical use is a regular expression argument to grep, an awk program, or a sed substitution that contains dollar signs. Use the backslash for one-off escaping inside an otherwise-unquoted or double-quoted string.