Critical hits happen when a player rolls a 20 on an attack roll, causing the attack to automatically hit and doubling the amount of damage dice rolled to determine the attack’s damage.
For example, if you land a critical hit with a scimitar, you roll 2d6 instead of 1d6, and then add your attack ability modifier. You do not double the attack modifier; only the damage dice rolled.
Critical hits include all damage dice, so if a Paladin hits with a warhammer, Searing Smite active, and uses Divine Smite when they crit, they would deal damage equal to 2d8 bludgeoning + 2d6 fire + 4d8 radiant + their Strength modifier.
Now you can see why Paladins and Rogues with Sneak Attack love to land critical hits so much!