So let me see if I'm understanding this, knowing nothing about cosmology other than what I've read on Wikipedia:
Black holes pull in matter, but as the matter falls into the black hole, before it reaches the event horizon, it starts to collide into other matter, which can cause a lot of heating, which can cause gas jets to erupt outward. In the case of a supermassive black hole (such as the one theorized to be at the center of our galaxy), the gas jets could be so massive and hot that the gas could pull itself together (via gravity) and become one or more stars.
Black holes pull in matter, but as the matter falls into the black hole, before it reaches the event horizon, it starts to collide into other matter, which can cause a lot of heating, which can cause gas jets to erupt outward. In the case of a supermassive black hole (such as the one theorized to be at the center of our galaxy), the gas jets could be so massive and hot that the gas could pull itself together (via gravity) and become one or more stars.