Errors in programs are called bugs. Removing those errors so that the program works correctly is called debugging.
There are two main types of errors.
The first type of error is syntax errors. Syntax errors prevent the program from running. They are also called compile errors. These errors are usually caused by misspelling words, leaving out required punctuation, or other types of typing mistakes. The compiler in a good IDE (integrated development environment) will usually point out these errors.
The second type of error is logic errors. With logic errors, the program runs but produces the wrong results. It could be something simple such as putting a decimal in the wrong place, or adding when you should have multiplied. But it can be much more complicated. These errors are sometimes very difficult to find.