termcap/terminfo is file(s) used to tell programs how to process characters on the multiple terminals that exists line 20+ years ago (wyse, dec vt ...). I think originally used for cursor positioning.
Why sometimes I can see colors and fancy chars while other times I don't.
That has to do with how whatever terminal you are using is processing the data in these files. There are settings that define what to do when a specific item is about to be "printed".
termcap was just 1 text file, terminfo can be looked as a "compiled" data file or set of files. Historically termcap was used by BSD, terminfo IIRC came from AT&T I think in the sysv days.
But recently even the BSDs seemed to have moved to terminfo.
Me, I always preferred termcap, but seems that file is hardly ever used these days.