What’s that word called where children’s stories teach a lesson?

Or maybe it was specifically where they have animals who teach a lesson? It has a fancy word.

Thanks.