A cosmic string is a very long (possibly as long as the diameter of the visible universe), very thin (less than the width of a proton) high-density object formed during the early moments of the big bang. You can see a rendering of such a string in the image above. There is a reason why it appears next to the starship Enterprise. Both of them are science fiction.
Like many science fiction ideas, cosmic strings are rooted in real theoretical work. Although they both contain the word “strings”, cosmic strings are not the strings of string theory. Instead they are topological defects in the fabric of space and time. To use a very rough analogy, as water freezes to ice, cracks can form at the intersection between two regions of the water that started to crystallize. In a similar way, during the inflationary period of the early universe, different sections of spacetime “freeze” into their current state, leaving cosmic strings like cracks in the fabric of spacetime.
The idea was first introduced by Tom Kibble in the 1970s, and it has risen and fallen in popularity over the years. Part of the reason for their popularity is that they can be introduced into cosmological models relatively easily. Another reason is that they have lots of interesting properties that could lead to observable consequences.
For example, as a very dense object extended over cosmic distances, cosmic strings would cause a type of galactic clumping similar to what we observe in the universe. We now know that this clumping matches dark matter extremely well. Based on current observation, no more than 10% of the clumping could be the result of cosmic strings (assuming they exist).
Cosmic strings also lead to more exotic phenomena. One of the most popular ideas is to use them as a time machine. If two cosmic strings passed by each other at high speeds, you could travel between them in such a way that you could travel back in time. In physics terms, we say they would create closed timelike curves. This type of exotic physics is possible because they are basically one-dimensional singularities.
Currently there is no observational evidence to support cosmic strings. Observational limits from galaxy distribution have found no signature of their existence. Searches for gravitational waves and the fact that no gravitational waves have yet been detected eliminates the existence of cosmic strings with high tension. If cosmic strings were relatively common, then we should detect them through the gravitational lensing of distant galaxies as the strings pass in front of them. We have thus far seen no such effect.
Where cosmic strings do appear from time to time is in science fiction works such as Star Trek. Like wormholes, tachyons, and warp drive, it is an interesting idea with fun properties to explore.