  (3+1)D topological phases of matter can host a broad class of non-trivial
topological defects of codimension-1, 2, and 3, of which the well-known point
charges and flux loops are special cases. The complete algebraic structure of
these defects defines a higher category, and can be viewed as an emergent
higher symmetry. This plays a crucial role both in the classification of phases
of matter and the possible fault-tolerant logical operations in topological
quantum error correcting codes. In this paper, we study several examples of
such higher codimension defects from distinct perspectives. We mainly study a
class of invertible codimension-2 topological defects, which we refer to as
twist strings. We provide a number of general constructions for twist strings,
in terms of gauging lower dimensional invertible phases, layer constructions,
and condensation defects. We study some special examples in the context of
$\mathbb{Z}_2$ gauge theory with fermionic charges, in $\mathbb{Z}_2 \times
\mathbb{Z}_2$ gauge theory with bosonic charges, and also in non-Abelian
discrete gauge theories based on dihedral ($D_n$) and alternating ($A_6$)
groups. The intersection between twist strings and Abelian flux loops sources
Abelian point charges, which defines an $H^4$ cohomology class that
characterizes part of an underlying 3-group symmetry of the topological order.
The equations involving background gauge fields for the 3-group symmetry have
been explicitly written down for various cases. We also study examples of twist
strings interacting with non-Abelian flux loops (defining part of a
non-invertible higher symmetry), examples of non-invertible codimension-2
defects, and examples of interplay of codimension-2 defects with codimension-1
defects. We also find an example of geometric, not fully topological, twist
strings in (3+1)D $A_6$ gauge theory.
