The speed would come from the relative motion between the Solar system and the origin of the comet combined with the gravitational interaction that caused it to get ejected from its host star.
I don’t think the speed is all that fast for an interstellar object.
It’s insanely fast compared to the speeds we can achieve.
Its all relative. :)