To get experience, the army that’s assigned to that general must flank or must be flanked when fighting. You’ll gain more experience when the battles are longer, and when more divisions from the same general are used. Also, avoid overstaffing the general (having divisions greater than the maximum it can handle) because this will reduce experience gain.
How Do You Flank?
To successfully flank in HOI4, you must attack a single enemy tile in at least three directions. If you want to grind experience using this method, use cheap divisions with manpower recovery (pure infantry + hospitals) when attacking. You will not push the enemy away, and you will only lose cheap equipment and some manpower.
How Can You Be Flanked?
If you want to earn experience by being flanked, find a tile where there are at least three tiles that the enemy can attack from. Check the above screenshot for an example. If you want to earn experience using this method without losing too much manpower and equipment, try to find a tile with Mountainous terrain and put defensive divisions there (pure infantry + engineering). A tile with a mountainous terrain decreases enemy attack by 60%, and decreases enemy air superiority by 10%. It’s also important to defend the tiles behind the one you’re on, since that will be the only free tile you could move to. Make sure you defend it to avoid your troops being encircled by the enemy.
Can I Earn Experience Faster?
If you have the No Step Back DLC, you can earn more experience quickly by opting for the Inventive Leadership spirit in the Army Spirits Tab. This will cost 25 army experience, but will increase your trickster experience gain by 20%.