As a prefix, 非 means 'non-' and attaches to nouns/adjectives: 非金属 (non-metal), 非正式 (informal/unofficial), 非法 (illegal), 非营利 (non-profit), 非暴力 (non-violent).
grammar
非 as a prefix creates a new compound word, unlike 不 which simply negates a verb/adjective. Compare: 非正式 (informal, a category) vs. 不正式 (not formal, a judgment).