It's not magnetic but gravitational.
As I said, MOST galaxies appear to have a black hole at the center, not all.
It does not affect collisions, that is purely governed by the orbit of each individual star. Sometimes (rarely) they hit, juist as comets and asteroids hit planets in the solar system.
And BTW, the stars in a galaxy technically do not orbit around the black hole (for those that have one). All the stars, and even the black hole itself orbit the center of mass of the whole galaxy (the barycenter).
From the perspective of the galaxy as a whole, the collision of two stars would have no effect at all. The same amout of mass (minus in tiny amount of energy liberated) is still there.