Prime number : It is a whole number which has two factors 1 and itself.
Composite number : A composite number has more than two factors (That is other factors excluding 1 and the number itself)
Now,1 is neither a composite nor a prime.(It is an exception)
It is not considered a prime because it is the smallest whole number possible.
It is not composite because it has no more than 2 factors.
Ultimately 1 Is neither prime nor composite because it has only one factor that is "1" itself.