About 2.6% power is generated by hitting an opponent with a basic attack. In single player and Challenge Mode battles, being hit by basic attacks generate a higher amount of power (~4%), while this only grants a very small amount of power in Online Battles and Survivor. Blocking does not generate any power, except from Wonder Woman/Regime, Static or Superman/Godfall's passives. Power drain effects remove a certain amount of power from the target.
A number of effects grant power as if they are a basic attack, such as reflect (purple) damage from Godfall Superman's passive or gear, and the hit automatically dealt after Batman/Dawn of Justice or The Flash/Wally West Rebirth dodges a special.
While tagged out, characters will generate power slowly. Without any modifiers, it will take ~23 seconds to gain one power bar.
Cyborg/Regime's passive is supposed to increase his power generation by 50% while tagged out, but currently it works at all times.
Martian Manhunter/Blackest Night's passive does not affect power generated while tagged out.
Power generation can be increased through gear or passives. An example of this is Martian Manhunter/Blackest Night, whose passive lets him generate power at an higher rate from his third phase. Killer Frost (both versions) are only characters who can reduce the rate of enemy's power generation.
There are also gear or passives that grants power in some other way than just increasing the generation rate. For example, Bane/Arkham Origins' passive gives all Arkham teammates one bar of power when he falls below 50% health, and Ra's Al Ghul's Scimitar gives the user 1 bar of power at the start of the match.
The Power Surge modifier increases power generation for both teams, making it the only modifier than can benefit the player.
The Dampening Field modifier decreases power generation for your team.
Power is very often confused with Energy, which is spent to enter a match and regenerates over time. This is further exacerbated by official text using the wrong term. For example, Superman/Man of Steel's passive description used to refer to energy for a long time prior to being fixed, despite that it actually means power.