When the sun is collapsed will it form a black hole?
No, it is not massive enough. It will end up as a white dwarf.
When the sun is beginning to collapse will it get smaller and denser?
Yes it will until some backpressure will kick in to stop further collapse , in large stars this backpressure can't fight back the huge mass so the gravity wins and the whole mass and all the leftovers collapse into a black hole but in mass that are smaller than the minimum limit to form a black hole they don't collapse to a black hole because the mass is not big enough for gravity to take over the pressures exerted by atoms in the case of white dwarfs - electrons.
read about them.
Separate names with a comma.