Okay, let's break this down step-by-step:
1) A neutron has a mass of 1.7 x 10-27 kg and an approximate radius of 1.2 x 10-15 m.
So we know the mass and radius of a single neutron.
2) The mass of the sun is 2.0 x 1030 kg.
So we know the total mass of the sun, which is much greater than a neutron.
3) When a massive star reaches the end of its life, it can explode as a supernova.
This supernova can form a neutron star.
4) A neutron star has a density about the same as a neutron.
So we can conclude that a neutron star has a density of:
Density = Mass / Volume
= (1.7 x 10-27 kg) / (4/3 * pi * (1.2 x 10-15 m)3)
= 1.6 x 1017 kg/m3
5) A neutron star forms from the core collapse of a massive star during supernova.
So it has a mass on the order of 1-2 times that of the sun (2 x 1030 kg),
but compressed into a sphere only about 10-20 km in radius.
So its mass would be huge, around 2 x 1030 kg, but confined to a tiny volume,
giving it an immense density, around 1.6 x 1017 kg/m3, the same as a neutron.
Does this help explain the concepts and walk through the calculations? Let me know if you have any other questions!