A syntax error is when you break the grammar rules of the language, such as forgetting to terminate a C++ statement with a semi-colon.
A logical error is when your code does not perform as expected, typically due to an assumption that proves to be incorrect.