A prime number has only two factors, 1 and itself, while a composite number has more than 2 factors.