When a hostile mob chases you, it will ignore fire and continue chasing you.
When a passive breed-able animal is following you (because you are holding wheat/carrots/seed) it will walk into fire.
If there is a wild ocelot and you walk close to it, it will run away and run into fire if it is in its way.
Tamed pets will walk into fire while following you.