Topological and non-topological defects? The meaning of topological defect is only known intuitively to me. One explanation is it is some discontinuity in a system that cannot be removed.
But I would like to know the precise mathematical definition(if one exists) of a topological defect. Also, would like to know what is a non-topological defect, also in precise mathematical language.
Thanks.
 A: First of all, let's set up the stage correctly. The setting will be a completely general $d$-dimensional Euclidean quantum field theory, so the answer will be applicable to string theory and topological field theory, which you have used as tags.
$\newcommand{\cB}{\mathcal{B}}$Choose a Euclidean quantum field theory. This means, grab a collection of dynamical fields $\Phi$ that you will path-integrate over and a collection of background fields (or background data), $\cB$, that will be your choice and won't be dynamical. E.g. if your quantum field theory of choice is a theory of free fermions $\Phi = \{\psi\}$ are the fermions themselves, while $\cB=\{\text{orientation},\ \text{metric},\ \text{spin structure},\ \text{background $\mathrm{U}(1)$ connection},\ldots\}$. You can really add anything you want in the list of $\cB$, so long as it can couple somehow to your dynamical fields. You should think of the partition function and the correlation functions as functionals of $\cB$.
We are now ready to give the definition of a defect:

A $p$-dimensional defect, is a $p$-dimensional operator made out of background fields: $\mathrm{D}_p[\cB]$.

In general, a $p$-dimensional operator, $\mathcal{O}_p[\Phi,\cB]$ (with $p\leqslant d$), is an operator supported on a $p$-dimensional submanifold of the manifold the theory is defined on. For example, $0$-dimensional operators are just local operators, $\mathcal{O}_0[\Phi,\cB](x)$, such as $\psi(x)$ in the example of the free fermions. One-dimensional operators could be, for example, Wilson lines, in a gauge theory $\mathcal{O}_1[a](\gamma)=\exp\!\left(i\int_\gamma a\right)$, where $\gamma$ is a curve. From the path integral point-of-view, these are just (background and/or dynamical) field configurations.
Now we can give the (tautological, awaiting explanation) definition of a topological defect

(definition 1)
A $p$-dimensional topological defect, $\mathrm{TD}_p[\cB]$, is a $p$-dimensional defect that is topological.

This means that if $\cB$, contains the metric, $\mathrm{TD}_p[\cB]$ does not depend on it. Note that it should not depend on it even implicitly, via the dependence on other background fields that might themselves depend on the metric. It can still depend on the other background fields, but in a way that the metric dependence drops out. In other words, it is a defect that you can freely deform.
In the case of topological defects, we can give an alternative interpretation. Since the defects are topological, they can be thought of as a symmetry generator of the theory. This is ultimately a euclideanised version of the statement that symmetry generators commute with the Hamiltonian. In their most recent appearances, symmetries of quantum field theories come disguised as (multiply braided, tensor higher-)categories (see this phys.SE answer for an intuitive explanation in 2 dimensions). Therefore if $\mathbf{Sym}_d$, is the symmetry $d$-category of your quantum field theory:

(definition 2)
A $p$-dimensional topological defect, $\mathrm{TD}_p$, is a $(d-p)$-morphism in $\mathbf{Sym}_d$.

The symmetry interpretation also allows you to say on what things do these $p$-dimensional topological operators act and how. They act on $(d-p-1)$-dimensional operators, $\mathcal{O}_{d-p-1}[\Phi,\cB]$, by linking with them and then (since they're topological) shrinking around them (cf. linking in higher dimensions). In other words:
$$\mathrm{TD}_p[\cB]\left(\Sigma_p\right) \cdot \mathcal{O}_{d-p-1}[\Phi,\cB]\left(\Sigma'_{d-p-1}\right) = \mathcal{O}'_{d-p-1}[\Phi,\cB]\left(\Sigma'_{d-p-1}\right).$$
For an in-depth exposition of these higher-dimensional topological defects you can take a look at the original GKSW paper exploring generalised global symmetries (what I wrote above would correspond to a (possibly non-invertible generalisation of a) $(d-p-1)$-form symmetry).
To make contact with the intuitive picture you had in mind for a topological defect, definition 1 says, in some sense, precisely that. Since the defect is made out of $\cB$ data, it cannot be removed --- only you have control over it; the $\Phi$ data cannot change it.
Finally, to make contact with string theory, or rather, with its underlying worldsheet CFT, in a two-dimensional CFT a more practical definition, that ultimately is the same metric-non-dependence of definition 1 is the following:

(definition 3)
A $p$-dimensional topological defect, $\mathrm{TD}_p$ in a 2d CFT is a $p$-dimensional ($p\in\{0,1,2\})$ operator that commutes with all the Virasoro generators:
$$\Big[L_n, \mathrm{TD}_p\Big] = 0 = \left[\overline{L}_n, \mathrm{TD}_p\right]\qquad {}^\forall n\in\mathbb{Z}.$$

