From one of the intro threads, with additions to clarify.
In ancient times, Wesloyden was a very spiritual area, populated by a loose civilization of shamanistic peoples. The general belief was that all humans had two spirits- a human one, and a Pokemon one. Various herbs, berries, and rituals were used to allow people to manifest parts of their Pokemon spirit. The most elaborate of them was the bonding ceremony performed on the tribal leaders- it allowed them to, at will, manifest any part of their Pokemon spirit, up to and including a full change.
Today, the belief in dual spirits isn't as strong, but some people maintain the old traditions. In truth, the ceremony is still conducted upon Gym Leaders and high-ranked League officials. Bonded leaders are capable of making areas in their cities where they have complete control over not only their own pokemon spirits, but the spirits of other people within. They can even cause people to manifest attributes of other pokemon, not just their spirits. (This is the main TF cause.)
Over the years, the energies from the Gyms have permeated the region. This is the reason that other things can cause TF, like eating certain berries, acting like a pokemon, and yes, mating with them.
I hope this is clear... if not, feel free to ask questions- they help me flesh out my ideas!