To keep it simple, they are just bonus effects that are randomly rolled on gear (in TVHM they are still somewhat rare but once you start playing in Mayhem mode they become a lot more common and at Mayhem level 8 and above they are actually guaranteed).
They generally have a certain effect as well as a condition as to when those effects are activated (for example, some of the most commonly used anoints allow you to apply additional elemental damage to your weapon for a short time whenever one of your action skills ends).
You can get anointments on guns, grenades and shields, but not on artifacts and class mods. Certain anointments are only usable for one Vault Hunter (for instance, there is one that grants the character Zane additional cryo damage whilst his SNTL action skill is active) whereas others are usable on any character.
In normal mode and TVHM they aren’t generally such a big deal, but once you start playing Mayhem Mode and get into the higher Mayhem levels, using items with anointments that synergize well with your build and possibly also adapting your build and playstyle to make the best use out of certain anointments becomes a must if you want to keep up with the enemy health scaling.
It should also be noted that there is a small amount of items (mostly various quest rewards) that cannot actually be anointed for some stupid technical reason which is kind of a shame because that means they aren’t all that viable in the post game.