When you attack another player's Headquarters Base, you can steal Resources from him if you win the Battle. The amount of Resources that you steal depends on the amount of units that survived the Battle and the total Steal Capacity, which you can see in the Military Units section. There is also a cap of how many Resources you can steal, which can be found in your Resource Management section: