On what basis are composite numbers and prime numbers judged

On what basis are composite numbers and prime numbers judged

Sum: in addition to 1 and its own factors, there are other factors, such as 4, 9
Prime number: a number with only 1 and its own two factors is prime number, for example: 2, 3