interjection
A casual interjection used to express refusal, denial, or disagreement. Often used in informal conversation.
「もう食べた?」「いや、まだ。」
"Have you eaten yet?" "No, not yet."
いや、それは違うと思う。
No, I think that's wrong.
ううん is a very casual, often childish or feminine way to say 'no', whereas いや is more neutral in casual speech.
The exact derivation is uncertain; it is a native Japanese interjection expressing negation or refusal.