A wormhole is a "tunnel" connecting two separate points in space-time. It consists of two apertures in space-time connected by a conduit outside normal space, through subspace. Since this conduit is shorter than the distance between the two points in normal space, it allows rapid travel between the two points.
If a wormhole is large and stable enough, a starship (or other traveler) could travel through it. A wormhole could also connect two different points in time as well. As wormholes collapse, they become smaller and are known as micro-wormholes.
Before knowing where the Harry Kim wormhole ended, Tuvok stated that there was a 75% chance that it didn't lead to the Alpha Quadrant. It may thus be concluded that wormholes never leave the Milky Way, or that the location of a wormhole's terminus can be readily determined within the galaxy but not more precisely.
Wormholes and the possibility of using them for time travel had been recognized by Human scientists since the 20th century. In 2368, Captain Jean-Luc Picard of the USS Enterprise-D agreed with faux historian Berlinghoff Rasmussen that using knowledge gained by means of time travel through a wormhole (for example, in order to save an endangered planet) could allow the "next Adolf Hitler" or Khan Noonien Singh to come into being. According to the captain, first year philosophy students had been asked the question ever since the first wormholes had been discovered.
No known naturally-occurring stable wormholes had yet been discovered in the Alpha or Beta Quadrants. The only likely candidate, the Barzan wormhole, was found to be unstable at its far terminus. However, several relatively stable wormhole-like phenomena have been reported in the Delta Quadrant.
The only currently known stable artificial wormhole is the Bajoran wormhole, created by beings known to the Bajorans as the Prophets, who dwelled within. This wormhole is stable enough for long-term, two-way space travel between the Bajor system in the Alpha Quadrant and the Idran system in the Gamma Quadrant.
In the 2370s, the Federation investigated methods of creating artificial wormholes. The project was headed by Dr. Lenara Kahn of the Trill Science Ministry, who eventually developed a workable theory that she tested aboard the USS Defiant in 2372. The technique involved generating a subspace tensor matrix in the 25,000-30,000 cochrane range, and then sending out a magneton pulse using a target drone. The pulse would then interact with the matrix to produce a subspace distortion, which would become an opening in the space-time continuum.
The first test of this technique produced a wormhole that was stable for 23.4 seconds. On the second test, a class-4 probe was launched through the wormhole to simulate the passage of an interstellar spacecraft. However, the probe's shields unexpectedly interacted with the tetryon field, collapsing the wormhole and producing a massive graviton shock wave that heavily damaged the Defiant.
The MIDAS array was able to create an artificial micro-wormhole that connected the Alpha Quadrant to the Delta Quadrant, but it was only stable for a brief moment.
Warp engine imbalances have also been known to create wormholes, as happened to the USS Enterprise in 2273. While attempting to intercept an unknown alien en route to Earth, Captain Kirk ordered warp drive utilized before proper simulations had been completed, causing the Enterprise to become trapped in a wormhole for a brief period of time.
See the original version at Memory Alpha