Context-Free Grammar (CFG) is a formal system used to define the syntax of programming languages and natural languages, characterized by production rules that replace a single non-terminal symbol with a string of non-terminal and terminal symbols. CFGs are powerful enough to describe many language constructs while allowing efficient parsing algorithms, making them essential in compiler design and language processing.