A fear can be a legitimate concern about something that actually threatens our safety, or it can be projected into the future in our minds about an event that may never happen or which gets blown out of proportion to the actual danger (Future Events Aooearing Real).
It can stem from a bad childhood experience, or just being told to stay away from something when we're young and impressionable. The subconscious mind will work on this as a young mind takes everything it's told by adults and people in authority very seriously. It'll run the routine in the background, looking out for any perceived threats which resemble the original one & every time something is spotted which fits the bill then you'll get a reaction. Sometimes these are known to the person & sometimes not. When not then they can perceive the extreme anxiety produced as a 'panic attack'. You're not aware of what's caused it and it seems to come from nowhere..
Our profession uses in the main something called the 'rewind', or 'cinema' technique. The client always feels safe as we dissociate them from the threat, and after several runs through then most find that the phobia has dissappeard without trace, or now has a completely different meaning. A fear has a slightly different mechanism so needs a different kind of treatment although the rewind can make a dent in it.. More to come on that.