Yes, in D&D 5e you have to roll d20 (20 sided dice, so 1-20) to see if you hit. To the result you add any additional modifiers you might have (like bonus from a relevant attribute) and compare it to enemy AC (armor class). If you are equal or higher you hit, if you are lower you miss. Rolling 1 on d20 is always critical miss (even is subsequent modifiers would r bring the total above enemy AC), when you roll 20 it’s a critical hit - you always hit, and do extra damage.

There is also advantage and disadvantage - with advantage you roll two d20 and choose a better roll, on disadvantage you roll two d20 and pick the weaker roll. If Advantage and disadvantage both apply you roll normal (even if there are more advantages over disadvantages or vice versa).

The game translates it all into percentages when hovering over the enemy, but as someone mentioned above you can look under the hood through the battle log (expandable thing on the bottom right). You don’t need to worry about it much though - the game really doesn’t won’t you to think too hard on the mechanics.

Damage works the same way, but the die depend on the weapon. Worth noting that some weapons h do similar damage but have different RNG distribution. For example battleaxe does 1d12 (one 12ve sided dice) while great sword does 2d6 damage (two 6 sided dices). Maximum damage is the same, however battle ax has an equal chance to roll any of the 12 outcomes. Two handed sword’s minimum damage is a bit higher (2 rather than 1) but bellcurve nature of rolling two dices means it is more likely to roll mid damage than the extremes.

Similar system is used for spells, but there are differences especially for ones relying on saving throws, rather that’s attacks.