Neutron stars are the densest objects in the universe. They are formed when massive stars collapse at the end of their lives. The collapse compresses the star's matter to such an extent that the electrons and protons merge to form neutrons. The density of neutron stars can reach up to several hundred billion tons per cubic centimeter, which is about 10^14 times the density of water.
To compare, the density of the Earth is about 5.5 grams per cubic centimeter, the density of the Sun is about 1.4 grams per cubic centimeter, and the density of black holes can reach up to several billion tons per cubic centimeter, depending on their size.