Until 1997 it was assumed that all stars belong to galaxy clusters. In other words 'bound' by the gravitational field of a galaxy.
It is now confirmed that there are very many stars which are totally independent of any galaxy. More than 600 have been identified in the intergalactic regions close to the Milky Way alone. Some estimates (see Nature, 2014) suggest that as many as 50% of all stars might be outside galaxies.
There is no generally agreed hypothesis as to how they have been formed.
Theories include : Ejection fromcollisions, Ejection via a close encounter with a black hole.
Note: the 'Inter' in 'Intergalactic' means 'between' rather than 'amongst'