Cosmic strings are hypothetical 1-dimensional topological defects which may have formed during a symmetry breaking phase transition in the early universe when the topology of the vacuum manifold associated to this symmetry breaking was not simply connected. It is expected that at least one string per Hubble volume is formed. Their existence was first contemplated by the theoretical physicist Tom Kibble in the 1970s.
The formation of cosmic strings is somewhat analogous to the imperfections that form between crystal grains in solidifying liquids, or the cracks that form when water freezes into ice. The phase transitions leading to the production of cosmic strings are likely to have occurred during the earliest moments of the universe's evolution, just after cosmological inflation, and are a fairly generic prediction in both quantum field theory and string theory models of the early universe.
In string theory the role of cosmic strings can be played by the fundamental strings (or F-strings) themselves that define the theory perturbatively, by D-strings which are related to the F-strings by weak-strong or so called S-duality, or higher-dimensional D-, NS- or M-branes that are partially wrapped on compact cycles associated to extra spacetime dimensions so that only one non-compact dimension remains.
The prototypical example of a quantum field theory with cosmic strings is the Abelian Higgs model. The quantum field theory and string theory cosmic strings are expected to have many properties in common, but more research is needed to determine the precise distinguishing features. The F-strings for instance are fully quantum-mechanical and do not have a classical definition, whereas the field theory cosmic strings are almost exclusively treated classically.