The HCF of two or more numbers is the largest common factor of the given numbers. It is the smallest number which divides the two or more given numbers.
The LCM of two or more numbers is the smallest number that is a common multiple of two or more numbers. It is the smallest number which is divisible by two or more given numbers.
Consider two numbers 120 and 144.
Prime factorization of 120 = 2 × 2 × 2 × 3 × 5
Prime factorization of 144 = 2 × 2 × 2 × 2 × 3 × 3
HCF of 120 and 144 = 2 × 2 × 2 × 3 = 24. 24 is the smallest number which divides both 120 and 144.
LCM of 120 and 144 = 2 × 2 × 2 × 2 × 3 × 3 × 5 = 720. 720 is the smallest number which is divisible by both 120 and 144.