嫌だ can be used as: dislike, mind, the answer of no.
In conversations, I also use it as "What a bummer!" (嫌だ、it's raining again!) "No way!" (嫌だ、I said no, remember?), or as "Oh my" (嫌だ、did you bake this cake? It's amazing!) ( 嫌だ、it's so late!)
Also if someone says nice thing about me, I use 嫌だ with a big smile - means I'm flattered and don't know what to say. (Saying "thank you" immediately seems presumptuous)
Also "Oops!" "Oh, silly me!" "Good grief!" when you did something unexpectedly: "嫌だ、I forgot to bring my wallet! お財布持ってくるの忘れた！" "嫌だ、I sat on my glasses. メガネの上に座っちゃった" and so on.
In its primary sense it is somewhat weaker than the English word "hate", which is very visceral and implies an active negative energy. The Japanese word is more a reflection of one's automatic response to something, and is probably closer in most contexts to "can't stand".
People may also use 嫌い in contexts where in English people would say "don't like". 大嫌い (daikirai) is closer to "hate".
When you're talking about food, you can say 嫌い in neutral contexts, but it's probably safer to say 食べられない (I can't eat it), often shortened to 食べれない in everyday conversation. Certainly, this would be better than 嫌い if someone's actually offering you something you don't like.
Obviously, you could, physically, put it in your mouth and chew it and swallow it, but to say you can't eat something in Japanese is a less offensive way of saying you don't like it.In general, though, it's not considered polite in Japan to be picky with your food; it's often seen as a sign of selfishness.