What determines the amount of trophies you win from a battle?

The amount of trophies won or lost is based on the difference between you and your enemy's trophies. Generally, if you win against a player who has more trophies than you, you will be rewarded with more trophies. On the contrary, losing against an enemy with fewer trophies makes you lose more.

Official answer