It's simple. Really. A star collapses and dies. It becomes, after a time, a super massive sphere. So massive that its gravitational pull will not allow light to escape. So all this light has to go somewhere...or rather, its energy. So the light is converted to other forms of energy...because we know that energy can not be destroyed but must be converted to some other form.
So the energy from this light is pulled in and gets converted to X-rays and other forms of higher frequency radiation like gamma rays. These, the 'black hole', cannot pull in so they spew out at very high speed and for great distances.
The name 'black hole' (which I detest) is an abysmal moniker for there is no hole. Yes, physical laws would seem to break down but there is no hole. It is nothing more that a super dense singularity that converts energy from one for to another on a MASSIVE scale.
See?