Here's how it breaks down:
Noun: When "behavior" refers to the way someone or something acts or conducts itself, it's a noun.
*Example:* "His behavior was unacceptable."
Verb: When "behavior" means to act or conduct oneself in a certain way, it's a verb.
*Example:* "The dog behaved well at the park."
It's important to consider the context of the sentence to determine which part of speech "behavior" is functioning as.