(covers information from several alternate timelines)
A black hole is an incredibly dense remnant of a star that has collapsed into a singularity under its own gravity upon running out of hydrogen fuel. Black holes have extremely strong gravitational fields, similar to cosmic string fragments, so powerful that not even light can escape.
The late-20th century NASA probe Voyager 6 disappeared into a black hole, emerging on the other side of the galaxy, where it came into the posession of a race of sentient machines. The machine race constructed a massive vessel around the probe to facilitate its mission of acquiring all knowledge, and it began its journey back to Earth. (Star Trek: The Motion Picture)
In 2152, the Enterprise NX-01 encountered a black hole that was part of a trinary system, something unheard of by either Starfleet or Vulcan scientists. Attempting to study the black hole, the Enterprise crew became affected by an exotic form of radiation which caused nearly all members of the crew to exhibit irrational and obsessive behavior. Subcommander T'Pol, whose Vulcan physiology was immune to the radiation, performed an analysis which indicated that prolonged exposure to the radiation would be fatal to the crew, forcing her and Captain Archer to navigate Enterprise through a hazardous debris field in order to escape the influence of the radiation in time. (ENT: "Singularity")
In 2366 the USS Enterprise-D engaged in an operation to stabilize the moon of Bre'el IV, which was in danger of crashing into the planet. The crew was informed by Q that the the deterioration of the moon's orbit was most likely caused by a black hole passing through the solar system's plane at near-right angles. (TNG: "Deja Q")
In 2369, the Enterprise crew encountered a race of aliens from another time continuum, who utilized the gravity wells of black holes as nests for their young. The aliens had mistaken a Romulan vessel's artificial quantum singularity, which the Romulans used as a power source, for a natural black hole, and their young became trapped. When the Enterprise generated a power transfer beam to send energy to the Romulan ship, it resulted in the creation of a temporal aperture, which disrupted spacetime around the ships and created a series of temporal fragments. With the help of the Enterprise crew, the embryonic lifeforms were eventually freed. (TNG: "Timescape")
In 2374, USS Voyager discovered a two thousand year-old communications relay network being used by the Hirogen in the Delta Quadrant. Analysis indicated that each of the relay stations utilized a harvested microsingularity as a power source. While engaged in battle with a Hirogen vessel, the Voyager crew used an antithoron burst to destabilize the containment field around the singularity and increase its gravitational pull. The plan worked, but the containment field failed, destroying the relay station and causing the singularity to grow into a black hole. While Voyager was able to escape, the Hirogen ship was destroyed. (VOY: "Hunters")
Black holes can be artificially created through the ignition of a small amount of red matter. In 2387, Ambassador Spock created such a black hole, in order to absorb the energy of a supernova which threatened the entire galaxy. Spock's plan succeeded, but he was too late to save Romulus, which was destroyed by the exploding star. The resulting black hole created a tunnel through spacetime, into which both Spock's ship, the Jellyfish and the Romulan mining vessel Narada were pulled, depositing the Narada in the year 2233, resulting in the creation of an alternate reality. Spock, who entered the black hole a few seconds after the Narada, emerged twenty-five years later due to the time differential, and was captured by Nero, the Narada's captain. Nero, who held the Federation responsible for the destruction of his homeworld, stole the red matter from Spock's ship and used it to create a black hole at the center of Vulcan, destroying the planet. Nero attempted to perform the same action on Earth as he did to Vulcan, but was stopped when Spock's alternate reality-counterpart piloted the ship containing the red matter to a collision with the Narada. This caused the red matter to ignite and create a black hole within the Narada itself, destroying the ship. (Star Trek)
Upon describing the scene from Star Trek VI: The Undiscovered Country wherein General Chang's Klingon Bird-of-Prey (see also Chang's Bird-of-Prey) is located and destroyed by the USS Enterprise-A and USS Excelsior (disrupting the Bird-of-Prey's cloaking device, thereby making the Klingon ship visible), the film's script lightheartedly refers to the point at which the exploding craft has become trapped as "the 'black hole'".