The fairy turned the prince into a cat.

Literal

Fairy [topic-は] prince [object-を] cat [into-に] turned.

~を~に変える ('change X into Y') uses を for what's being changed and に for what it becomes. 変える is the transitive 'change,' paired with intransitive 変わる. A classic fairy-tale transformation.