According to its man page, "terminfo is a data base describing terminals, used by screen-oriented programs...". It defines a generic set of control sequences (escape codes) used to display text on terminals, and makes possible support for different terminal hardware without the need for special drivers. The terminfo database has largely supplanted the older termcap and the totally obsolete termlib ones. This is usually of no concern for program installation except when dealing with a package that requires termcap.
Most Linux distributions now use terminfo, but still retain the older termcap libraries for compatibility with legacy applications. Sometimes there is a special compatibility package that needs to be installed to facilitate use of termcap linked binaries. Very occasionally, an #define termcap statement might need to be commented out of a source file. Check the appropriate docs for your particular distribution for information on this.