If gravity is atractive, why doesn the sun collapse?
You are made of matter too, which all attracts each other. Why don’t you collapse into a point? Atoms have repulsive forces that keep them from compressing. It takes a lot of pressure to make even a little compression of something solid. Aside from the radiation pressure that keeps the sun expanded, there are forces resisting “compressing to a point”. So even with the enormous amount of mass in a sun, when it goes cold first it collapses to a dwarf. If there is enough mass, the atoms do collapse and you get a neutron star, but neutrons also have a lot of resistance to being squished. If you have much, much more mass, then the gravitation does overcome even those forces, and there is nothing left to fight the gravitational forces. Then you get a black hole.