Looks like the vacuum breaker (part of a normal sillcock) has broken.
It's a one-way valve that keeps water in under pressure, but lets air in when there's a vacuum in the pipe, to prevent siphoning.
Should be trivial to unscrew the remaining plastic from the metal valve body and screw in a new one. Replacements seem to be commonly available for not much cash. There will be that plastic part, an o-ring type seal between that plastic part and the sillcock, a floating valve part that's usually rubber which goes in before that part is screwed down, and a cap that threads on the outside of that part.
Replacing the whole sillcock is either harder, or much harder, depending on access to the other end and what means was used to connect it. If the vacuum breaker is the only problem with it, not much reason to replace the whole thing.