However, singularity usually refers to the singularity inside a black hole, which is easier to explain.
After a star collapses into a black hole, it will form a "horizon" outside due to gravity. This horizon is actually a range, and all substances entering the horizon, including light, can no longer escape. The whole area surrounded by the "horizon" is also called a black hole.
However, after the star collapses to the horizon, the collapse is not complete. Objects falling into the horizon will not stop when they enter the horizon. Under the great gravity, they will continue to fall towards the center of the black hole. Eventually, the mass of the black hole itself will compress all the matter and mass in it to a point in the center, which is the singularity.