When does a fear of something constitute a phobia? Obviously, not all phobias are made equal. There are some 'phobias' that involve things that are normally do inspire fear in others (such as, famously, spiders). Honestly, I never understood why being scared of things like spiders constituted a 'phobia', since phobias are supposed to be irrational fears, but being afraid of spiders (at least, certain species) is obviously normal and not exactly irrational. 

Personally, I often say I have a phobia of ghosts. But do I? I don't believe in ghosts, so I consider it irrational, but 'ghosts' in general don't scare me. The ghosts of Skyrim never scared me, though the ones in certain quest mods do. And I've certainly never found Casper scary, but I could never force myself to enter a location I've heard is haunted, purely because of that label. Old abandoned buildings (particularly houses) also scare me for no reason. Simply being in one makes me want to get out of there as fast as possible. And considering that ghosts in general don't scare me, I'm not sure my weird and obviously nonsensical fear would actually count as a phobia. Its, of course, normal to find ghosts scary. But is it normal to not be able to enter a supposedly 'haunted' location, or an old rotting building, even though I honestly don't see any reason for ghosts to exist. And thinking about that fact doesn't help one bit for some reason.

So, what's the line between being just scared of something and having a phobia towards it?
The DSM-5 criteria for Specific Phobia are:

A. Marked fear or anxiety about a specific object or situation (e.g., flying, heights, animals, receiving an injection, seeing blood).
Note: In children, the fear or anxiety may be expressed by crying, tantrums, freezing, or clinging.
B. The phobic object or situation almost always provokes immediate fear or anxiety.
C. The phobic object or situation is actively avoided or endured with intense fear or anxiety.
D. The fear or anxiety is out of proportion to the actual danger posed by the specific object or situation and to the sociocultural context.
E. The fear, anxiety, or avoidance is persistent, typically lasting for 6 months or more.
F. The fear, anxiety, or avoidance causes clinically significant distress or impairment in social, occupational, or other important areas of functioning.
G. The disturbance is not better explained by the symptoms of another mental disorder, including fear, anxiety, and avoidance of situations associated with panic-like symptoms or other incapacitating symptoms (as in agoraphobia); objects or situations related to obsessions (as in obsessive-compulsive disorder); reminders of traumatic events (as in posttraumatic stress disorder); separation from home or attachment figures (as in separation anxiety disorder); or social situations (as in social anxiety disorder).

The parts I would highlight are that the fear has to be intense and out of proportion to the actual risk, it has to cause some sort of impairment, and it can't be classified as part of a broader mental disorder.
So, if someone sees a spider at work and is startled by it, you wouldn't call that a phobia by itself from a clinical perspective. You might joke about it among friends and say you have a phobia of spiders, but that's just using embellishing language, it's not a diagnosis.
If someone lives in an area where dangerous spiders are present, and takes reasonable precautions to defend themselves (for example, not walking barefoot outdoors), that would not be a phobia: it's not out of proportion.
However, if someone sees a spider at work and then experiences intense symptoms while at work that interfere with their performance, make them constantly preoccupied that there is going to be another spider, and it's a sustained rather than passing experience, then that's closer to the DSM-5 definition of phobia.
In either case, it's really up to a professional to assess the situation and determine if a diagnosis is warranted.