Syntax highlighting is a feature in text editors that displays source code in different colors and fonts according to the category of terms. This visual aid helps programmers understand code structure, identify errors, and improve readability and maintainability of the code.