You are absolutely right that not even light can escape from a black hole, and yet they launch huge, energetic jets that we can see. The key here is while nothing can escape a black hole once it has fallen past a certain point — called the event horizon — the jets originate from outside that region.
Black holes themselves are invisible. But outside the event horizon, infalling matter collects into an accretion disk, which grows hot due to friction and emits all sorts of radiation, from optical through X-rays. When astronomers observe a black hole, they’re actually observing the radiation from this disk, which ends at the event horizon.
It is from the accretion disk that the jets are formed and launched, again well outside the event horizon. Astronomers believe these jets arise through interactions between the black hole’s magnetic field and electrically charged plasma particles in the accretion disk. When the black hole’s magnetic field accelerates them, they gain enough energy to glow, allowing us to spot them. For stellar-mass black holes, the jets “turn on” and become visible at a distance of tens of thousands of miles from the black hole. For supermassive black holes, this distance is millions of times greater.