@literary Basically:
kein = no (as in, I have no idea = Ich habe keine Idee) - the opposite of "a/an"
nicht = not (as in, I can't do that = Ich kann das nicht machen)
You use "kein" with neuter or masculine nouns, and "keine" with feminine and plural nouns. There are also other endings thanks to German's complicated case system (keinen, keinem, etc.) and it works the same way with ein, eine, einen, etc.