To simply add a few pictures to Roko's answer
In this simple example I am going to take my light tank and attack an infantry in a city. The infantry will defend, and my tank will attack it.
When preparing for a battle First identify the terrain where the battle will be. Very important.
Select the province > terrain is shown in the upper right corner
In this case a city.
Second: Define the target - In that location.
look at the unit's stat sheet. Click the unit's "icon" in the box.
Also make note of any fortifications/bonus


So I follow the red arrows. We defined the battleground as city so the target is:
15 hit points
infantry class (see terrain can matter - on the water it would be ship class, Planes refueling or in convoy are infantry class instead of air)
Pause there for a second, because we have to define our attacking force. Look at the next section for clarification:
Third: Define attacker
One light tank
Again follow the red arrows
Terrain: City
Hit points: 10 - Yes, the hit points are reduced in cities. armored units in cities are fragile
Armor class - armor
Strength: -50% - That means that the published value of attacking or defending is cut in half
Damage to the enemy: 1.5 points - We are attacking an infantry class unit, normally a 3.0 attack value, but the -50% urban penalty drops that to 1.5.
Now that we know the attacking force is armor class we can return to the blue arrows in the defending infantry
Defending against armor: 1.5 points
Fourth - Calculations:
So here is how that battle will go: Each round takes one hour.
Round 1: Tank whacks infantry to open the battle. Infantry takes 1.5 damage reducing it's hit points from 15 to 13.5. Infantry defends itself against the tank, and returns 1.5 damage to the tank reducing the tank to 8.5 hp.
Round 2: Again each side hits the other for 1.5. Results after round 2: Infantry 12 hit points, tank 7 hit points
Results after round 3: Infantry 10.5 hit points, tank 5.5 hit points
Results after round 4: Infantry 9 hit points, tank 4 hit points
Results after round 5: Infantry 7.5 hit points, tank 2.5 hit points
Results after round 6: Infantry 6 hit points, tank 1 hit point
Results after round 7: Infantry 4.5 hit points, tank destroyed.
Now I question that round 6 to 7 results in my mind. I am thinking as the tank gets that weak it doesn't hit as hard, but I have not studied that closely. Also it may be that if the tank is destroyed in round 7 that it will not actually damage the infantry that round. That is a game nuance question for @DxC or @Restrisiko or equivalent expert.
Fifth - Variations
Three important factors were left out of the calculations above
X-factor: There is a random value in each attack to account for the randomness of real battles. Attacks can vary from zero to 100% effectiveness.
Fortifications: If the infantry had a fort, for example 33% fort value that means the tank's attack of 1.5 would be split into 1 point damage to the infantry and .5 damage absorbed/deflected by the fort
What if both sides attack: That is a possibility. In most cases it is better to defend than to attack. But if I am controlling the infantry in this case I *might* want to counter attack the enemy tank. in that case the infantry will attack the tank with 1.0 points and the tank will return 1.5 hp damage to the infantry. Not a wise choice here, so I won't. Other cases might be different. If the infantry did counter-attack there would be two hourly battle calculations, each on their own timer.