Creatures learn skills like Blue Magic. Enemies need to use moves of similar type on the fiend.

Examples: Machina Panzer learns Sorcery Ray upon being hit by Sorcery Ray or high level magic. Garik learns Mighty Guard if you use a curtain or cast Shell/Protect on him.

Every creature has a set list of abilities they can learn, and for some they need to be at a sufficient level. I think Chocobo has to be Level 40+ before it can learn Meteor, for instance.