Our subconscious mind warns us when we approach a situation that it conceives as dangerous. We know this by becoming scared or anxious. However, with a phobia the same happens but the mind overreacts.
It can even happen in situations where there is absolutely no risk. Hypnotherapy will correct this sensitivity/anxiety. It often involves finding out how the phobia began.