Specific phobia is an anxiety disorder which is characterized by an extreme fear of an object or situation. And being exposed to that feared object or situation makes the anxiety worse, and some may even have an extreme anxiety reaction, such as a panic attack. Because of this anxiety reaction to the feared object or situation, the sufferer then turns to maladaptive coping skills by avoiding the feared stimulus altogether.
On the other hand, agoraphobia is a condition where you avoid public places for fear of not being able to get help or where a panic attack may occur.
So while both specific phobia and agoraphobia involve the person utilizing avoidance, the reason for the avoidance is different. The person with specific phobia avoids feared objects or situations, while the person with agoraphobia avoids public places for fear of not getting help or because they might have a panic attack there.