We investigate the polarization of the vacuum for scalar, fermionic and electromagnetic fields induced by cosmic strings. Locally Minkowski, de Sitter and anti-de Sitter background geometries are considered. As local characteristics of the vacuum the expectation values of the field squared and of the energy-momentum tensor are considered. The contributions induced by the nontrivial topology of a cosmic string are explicitly extracted. The asymptotic behavior of the vacuum expectation values is discussed near the string and at large distances. For the de Sitter and anti-de Sitter geometries the influence of the gravitational filed on the vacuum characteristics is essential at proper distances from the string larger than the curvature radius of the background spacetime.