Psychology views phobia as a conditioned reflex and a psychological state that is passive and fearful. Phobia can be divided into two types. The first type is when the person develops fear toward a change in conditions, such as being in a foreign environment, or feeling suspicious towards the behaviour of others. These instances will lead to the development of direct fear. The other type of fear occurs when what one sees and what one thinks do not match each other, such as being fearful of dogs and animals. If one was bitten by a dog in the past, this will develop into an unconditioned reflex, because the pain of the past will aggravate the response of unconditioned reflex that we have, creating fear and pain.
Hence, the conditioned response is a result of having seen the factors that cause fear, while the unconditioned fear is the natural response that we have towards natural factors or our own imagination. Hence, phobia can be divided into conditioned stimulus and unconditioned stimulus. For example, when seeing a box of living snakes, one may be afraid that they will slither out of the box. Seeing a box that is dangling from a building and swaying left and right will be a conditioned stimulus and the fear that it will drop down is a conditioned fear.
Clinical psychologists believe that in order to eliminate this fear, one must allow one's fearful state to ease and eliminate the conditions of the fear. For example, a psychologist can tell the person that the box which contains the snakes is hammered shut and nailed tightly, so the snakes cannot possibly come out, or that even though the box that is dangling from the building is swaying left and right, the steel cable attached to it is such that it would never allow the box to drop.
A better way of treating phobia is to use systematic desensitisation toward the conditioned stimulus that causes the fear and on the imagination that is related to the response. This means that the patient with phobia will be exposed to the associations of the feared event and the habitual fear response will be replaced with a more accurate view of the situation, allowing the patient to become more relaxed and believe that the feared event will not happen. During systematic desensitisation, sometimes the patient is prescribed medication, however, I believe that psychological treatment is a more appropriate way to treat a patient than medication.
All in all, phobia occurs due to a lack of understanding about the feared event and is a reflexive response toward the stimulation of the brain's central nervous system. As long as you can eliminate the conditions of fear and eliminate the fearful psychological state, turn fear back into a normal state, and frequently encounter the feared event or object when the brain cells are not under a state of tension, you will be able to systematically reduce your sensitivity towards the feared event or object and eliminate phobia.