There are several types of errors that can occur in programs, including lexical errors, syntactic errors, semantic errors, and logical errors. Error handling functions should clearly report errors, recover from errors quickly, and not slow down processing of correct programs. When parsing code, common recovery strategies include panic mode recovery, phrase level recovery, using error productions, and global correction. Universal parsers and top-down/bottom-up parsers are different techniques used for parsing grammars. Context-free grammars are commonly used to specify the structure of programming languages.