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.