Compilers detect syntax errors, which are violations of the programming language's grammatical rules (keywords, punctuation, statement structure). Semantic errors involve incorrect logic or meaning, logical errors produce wrong results without breaking rules, and internal errors are compiler defects.