In programming, a hook is a place and usually an interface provided in packaged code that allows a programmer to insert customized programming. For example, a programmer might want to provide code that analyzed how often a particular logic path was taken within a program. Or a progammer might want to insert an additional capability. Typically, hooks are provided for a stated purpose and are documented for the programmer.
Some writers use hook to also mean the program that gets inserted.