varsha said:
how is it possible when the black hole sucks everything??
Simply put, a black hole sucks in no more than anything else does.
A black hole's gravity is entirely dependent on its mass, same as an ordinary star, including
this BH-formerly-know-as-a-star. Presuming that, when the star collapsed, it did not lose any mass, then its gravity has not changed. The planets, gravity-wise, see no change. Neither would a spaceship in orbit.
What is surely confusing you is this: the newly formed black hole
can and does have hugely strong gravity (as you've read) -
but only in the space where the star used to be.
I refer you to the attached diagram for clarification.
Planet's gravity well on the right, BH on the left. Note that, since both objects are the same mass, they both have the same curvature (gravitational pull).
Now, note how much pull the spaceship s1 experiences in the left diagram and in the right diagram - it's the same in both. Note how much pull spaceship s2 experiences: same.
But look at spaceship s3 - it only exists in the BH diagram because in the star diagram
it would be below the surface of the star. It can get very close to the BH, since it's much smaller, and there, it can experience an extremely strong gravitational pull.