If I gave you an ice cream (or chocolate, or cake, or any other treat that you really like) with one hand and made a fist with the other hand and drew it back as if to hit you and the next few times you were handed a treat, the same thing happened, what would happen the next time you were handed an ice cream (or the treat of your choice) but this time there was no fist?  You would feel anxious, maybe afraid.

Yet the ice cream (or treat) is not scary, it's just that the ice cream has been conditioned to produce fear when it becomes associated with the fist.  The fist was scaring you and that became associated with the ice cream (chocolate, cake etc).

Anything that happens repeatedly, (or even once, if the incident is traumatic enough) at the same time something else is causing an emotion, will itself get conditioned to produce the same emotion.

Remember Pavlov's dogs?  The dogs formed an association between bell and food which caused them to salivate.  A new behaviour had been learnt.

All behaviours are formed this way and the good news is that just as a new behaviour can be learnt, it can also be unlearnt and replaced with a different behaviour, once a new association is formed.

Eating gets conditioned more that any other behaviour, because it usually happens three times a day!  We also need to eat to survive, so it is a huge and very important part of our lives!