You can raid other players' towers and earn trophies, gold, training points, and loot drops. Each time you are paired up with an opponent you either have the option to attack it, or refresh to get another player if the tower/rewards aren't desirable.
You have one hour to attack that player before it automatically refreshes, or you can pay 3 gems to manually refresh it for another opponent. Every time you refresh manually, the next time you refresh will cost more gems if you haven't attacked a tower in the meantime.
If successful you get random loot drops equivalent to half of the floors that tower had, rounded up.
The gold earned from a tower is equal to the sum of all tower defenders' levels * 1.25. (roughly tower rating * 18.5).
Prestige earned is equal to the tower's rating. Tower rating is equal to the sum of all tower defenders' levels / 30, rounded up, then multiplied by 2. This would make the highest theoretical tower rating equal to 160 (max 3k gold reward).
Prestige earned from a successful tower defense is your own tower rating divided by 2, plus 10.