Il n'est pas : the pronon "il" in this case is for replacing a group form mainly by a noun such as "cet ami" (this friend) or "ce chien" (this dog)
So if you want to say "He didn't came" you could say "Il n'est pas venu", "He is not nice" "Il n'est pas gentil"
Ce n'est pas : this is the right way of writting it and "Ce" is a pronoun to replace an entire idea
For example: you want to say "The book is mine"/ and someone could answer / "this is not true"
"Ce livre est le mien” / "Ce n'est pas vrai" so "ce" replace the entire fact that the book was mine.
I hope it is clear!