Gravity appears to be somewhat special compared to the other fundamental forces, in that it has infinite range and is always attractive; the other fundamental forces are either sometimes attractive or sometimes repulsive or operate only at very short ranges. Because of this, there are certain situations in which gravity can win out against all the other forces, and an object will implode on itself under its own gravity.
These sorts of events can occur in objects the size of stars. An object like a star is created when vast clouds of hydrogen and other material come together under the influence of gravity. As gravity compresses the center of the proto-stellar mass further, eventually it becomes hot enough to ignite nuclear fusion, and a star is born. The heat of the nuclear reactions at the star's core produces an outward pressure that is trying to make the star expand, while gravitational forces are trying to make the star shrink. The star can remain stable balancing gravity and expansion this way for millions or billions of years, but eventually, the nuclear fuel runs out and nuclear reactions cease, and now gravity is king again. Paradoxically, the more nuclear fuel a star has, the sooner it runs out, because the heavier a star is the hotter it needs to be in order to counteract gravity. A star such as our sun would take about ten billion years or so from the time it ignites till it succumbs to gravitational collapse, whereas a star fifty times as massive would fall in a few million years.
The type of gravitational collapse that inevitably results depends on how massive the star is. For a star such as our sun, gravity is not strong enough to keep the nuclear reactions going past the point the core has fused into carbon, and at that point, the star's core will contract until it becomes a tightly packed assembly of atoms that behave like a metal, a white dwarf. For stars that are larger than the sun, gravitational collapse is usually much more dramatic. Nuclear reactions keep going in such large stars to the point that the star's core tries to fuse iron, and fails, because any nuclear fusion of iron or heavier elements give out less energy than they use. At that point, the star's core becomes overwhelmed by gravity and implodes on itself, sending shock waves through the gases in the star's outer envelope, causing a supernova. If the imploded core has a mass between 1.5 to approximately 3 solar masses, that core turns into a tightly packed assembly of neutrons called a neutron star.
For stars that leave remnants bigger than that it's not quite clear what happens on gravitational collapse. Prevailing theories in astrophysics would say that because there would be no electron degeneracy pressure or neutron degeneracy pressure to keep the collapse from going on indefinitely, it would collapse into an object known as a black hole. A new theory has just been very recently proposed that uses some arguments from incipient theories of quantum gravity to show that there is an alternative fate for such massive stars, called gravastars.
Other objects besides stars can undergo gravitational collapse. A fraction of a second into the birth of the universe, irregularities in spacetime might have collapsed into tiny black holes that squeeze a billion tons (about the mass of a large mountain) into a space a quarter the size of a proton. These primordial black holes, if they exist, might have largely evaporated due to their emission of Hawking radiation. The centers of highly active galaxies known as quasars are thought to be immense spinning black holes that were formed when matter near the center gravitationally collapsed when the galaxy came together. The center of our own Milky Way also seems to contain such a super-massive black hole as well, likely a remnant of a time when the Milky Way was in a quasar phase.