The stock or fore grip of an AEG usually contains the battery.
The physical size of the cells in your battery usually determines how much charge it is rated to hold and thereby how many times it will fire your replica before it runs out. Charge capacity is measured in milliampere hours (mAh).
The number of cells determines the force that the replica can extract from that battery at a given time and thereby determines rate of fire and trigger response (measured in volts).
NiMH (nickel-metal hydride) are the ‘standard’ batteries which require a basic charger and are very safe to use. The disadvantage is that the large NiMH batteries are bulky and require a large space inside the AEG to store them (such as inside a solid stock). Small NiMH batteries overcome the size issue but do not last for long so you will find the battery will run out after 1000 rounds or so and you have to swap it mid game. AEG’s are usually designed to run on 8.4 volt NiMH batteries.
Lithium battery types (Li-Po, Li-ion, Li-Fe etc.) have combined the size of mini battery with a capacity of a large battery. Lithium batteries are somewhat volatile; if they are incorrectly charged or shorted out or punctured they will rapidly ‘balloon’, discharging noxious gasses and enough heat to start fires and melt plastics. As long as you are careful when handling the battery, plus you buy a quality battery and a quality charger with a cell balancer, you are unlikely to experience any problems. Lithium batteries will be permanently damaged if you run them till empty. You can fit an alarm in your replica which lets you know when your battery has dropped to critical capacity. As well as volts and milliampere hours a li-po battery has a C rating, the high C rating cells have a greater ability to satisfy rapid peak power demands.
Do not make the mistake of thinking that AEG range is affected by battery or motor power, only rate of fire and trigger response is affected. The spring moves the piston forward at the same distance at the same speed and is not related to the force supplied by the motor.
Some AEGs use a ‘proprietary’ battery, which is to say that the shape of the battery must be tailored to the space available in that particular replica.