'not' functions as an adverb. It negates a verb, an action or state. For example:
"I am not" means, I don't exist.
'no' functions as an adjective. It negates a noun, a person, place, or thing. For example:
"I am no hero" means, heros are none.
In other words, when someone says, "I am no hero", they're expressing this:
I didn't even consider that I was a hero. Hero has nothing to do with anything. hero = none = no = zero = I am no hero.
If, however, someone says, "I am not a hero", they're expressing this:
I considered that I was a hero, and then I decided that I wasn't a hero. hero = possibility = not a possibility = I am not a hero.
:D