It is a common misconception that agoraphobia is fear of open spaces. It is not. Agoraphobia is a fear of having a panic attack in a situation from which one cannot escape, and hence suffering embarrassment or some greater harm. It derives from the Greek words for marketplace (agora) and fear (phobos), and so it means literally "fear of the marketplace". People with severe agoraphobia find it impossible to leave their houses although they may be perfectly happy, confident and controlled within their own personal space. Hence, agoraphobia is better understood as a fear of being in public, whether in general or in certain situations.
The physical symptoms of a panic attack are reasonably well-known to everyone - hyperventilation, a racing pulse, sweating, shaking, and in extreme cases dizzyness and bodily pain. This pain is often localized in the chest and radiates out to the left arm and jaw, but it can occur in literally any part of the body that the sufferer focuses on. But much worse than any of these physical symptoms for the sufferer is the psychological element of the panic attack, and it is this psychological element that leads to the development of agoraphobia.
During their first panic attack, sufferers typically believe themselves to be suffering from a major medical emergency. Many call for an ambulance because they think they are having a heart attack or stroke; others think it is a nervous breakdown. Panic attacks are frequently accompanied by an intense fear of imminent death or of "losing your mind", and a lot of sufferers fear that they are about to lose control of their behaviour and act irrationally; a fear of uncontrolled vomiting or urination, and resultant embarrassment, is also common.
Some experienced sufferers learn that this feeling of imminence never proves to be well-founded and so can control it, but others suffer a worse fate: they begin to alter their patterns of activity because they do not feel that they can control the onset or course of panic attacks, and they became afraid that they will have a panic attack in a situation from which they cannot escape. This sufferer is well aware that they have a panic disorder and may be able to ride out the individual panic attack well enough because they know that they are not actually about to die, but their fear has become more sophisticated: now their main fear is the fear itself. This is agoraphobia.
The fear might be associated with a particular circumstance where one suffered a panic attack before, like having a haircut, or sat in a restaurant waiting for food to arrive, or on a subway train. The fear of the physical and psychological symptoms of the panic attack is compounded by the fear of appearing to act bizzarely in a public place such as these. The agoraphobic is someone who has not tackled the underlying reason for their panic attacks, but instead opted to alter their behaviour so that they are not in situations where a panic attack has occurred in the past or might occur in the future.
In extreme cases, the individual might fear leaving the house because any public place in which they cannot easily escape to privacy might be the scene of a potentially-embarrassing panic attack. Many sufferers of panic disorder feel isolated because they fear others will not take their affliction seriously, and the inability to communicate to people around them what exactly they are experiencing - because they do not feel anyone will understand - further feeds their anxiety.
The only possible cure for the agoraphobic is to seek to address the underlying reasons for their panic disorder, which agoraphobia is secondary to. Agoraphobia is not actually fear of the marketplace of such, but fear of the fear experienced in the marketplace; avoiding the marketplace rather than tackling the fear itself is clearly no solution. But even worse than agoraphobia is self-medication with drugs or alcohol to attempt to calm oneself down so that situations no longer inspire anxiety; like excluding oneself from the marketplace, excluding oneself from reality cannot be expected to address the underlying cause of panic disorder either.