Two weapon fighting and dual wielding are not the same thing in this edition.
The second attack is a bonus action, not another Attack action
It counts as two attacks in that you have to roll the d20 twice, but this is a case where a term from a previous D&D edition might trick you in this edition. Let's break this down into details.
Two-Weapon Fighting (Fighting style, Ranger/Fighter, class feature)
When you engage in two-weapon fighting, you can add your ability modifier to
the damage of the second attack. (Basic Rules p. 25)
This fighting style is an improvement on two weapon fighting for any class of PC(Chapter 9, Combat).
When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative. If either weapon has the thrown property, you can throw the weapon, instead of making a melee attack with it. (Basic Rules, p. 74)
Dual Wielder is a feat, and has a special meaning.
Dual Wielder (PHB)
You master fighting with two weapons, gaining the following benefits:
- You gain a +1 bonus to AC while you are wielding a separate melee weapon in each hand.
- You can use two-weapon fighting even when the one handed melee weapons you are wielding aren’t light.
- You can draw or stow two one-handed weapons when you would normally be able to draw or stow only one.
Note that if you aren't a Fighter or a Ranger, you could take the Dual Wielder feat and use two weapon fighting with two warhammers (which are not light weapons). Your second Warhammer would not get the ability-score-based damage bonus (+Strength mod). The Fighter or Ranger class feature allows the PC to add the damage bonus from the chosen ability score to that bonus action attack.
Now let's complicate this by having multiple attacks at fifth level
Let's say you are a fifth level Ranger with the dual wielder feat. Fifth level Rangers get a second attack (as do 5th level Fighters, Paladins, Barbarians, and Monks)
You are using two long swords. (Two weapon fighting (Ch-9) + dual wielder feat allows you to do this with non-light weapons). You have two attacks, and you have the bonus attack from using two weapons: three total chances to hit.
Case 1: If you have the two weapon fighting style as well, all
three attacks (if they hit) accrue the Strength based damage bonus.
Case 2: If you do not have the two weapon fighting style, two of your
attacks (if they hit) get the +Str mod damage bonus, but the bonus
action attack will not.