(If the image is too big, you can read the original article at this link : https://doduykhuong.com/2018/03/25/how-to-use-activity-duration-type-in-primavera-p6/ )
In Primavera P6, when we assign resource to activity there is a equation:
Original Duration x Units/Time = Total Units
( 10 days x 8 hours/day = 80 hours )