If $\mathfrak g$ is any Lie algebra and $x \in \mathfrak g$ is any element, the kernel of the map $ad(x): \mathfrak g \rightarrow \mathfrak g, y \mapsto [x,y]$ is the centraliser of $x$ in $\mathfrak g$, $C_\mathfrak{g}(x):= \lbrace y \in \mathfrak g: [x,y]=0 \rbrace$.
If $\mathfrak g$ is any semisimple Lie algebra and $x \in \mathfrak g$ is any semisimple element, the centraliser $C_\mathfrak{g}(x)$ is a reductive subalgebra of $\mathfrak g$, see Centralizer of semi-simple element in semi-simple Lie algebra. Such elements are called regular if their centraliser is a Cartan subalgebra; equivalently, they lie in exactly one CSA, cf. If $x\in L$ lies in exactly one Cartan subalgebra, then $x$ is regular. If they don't, their centralisers are non-abelian i.e. contain a semisimple part.
In general, "most" semisimple elements are regular (vaguely said, the irregular ones lie in subspaces of lower dimension).
Examples: Let $\mathfrak g = \mathfrak{su}_n$, i.e. the skew-hermitian $n \times n$-matrices of trace $0$ viewed as real Lie algebra (of dimension $n^2-1$). Let's look at the standard Cartan $\mathfrak t$ given by the diagonal matrices in there (these are the diagonal matrices whose entires are all purely imaginary and add up to $0$).
For $n=2$, every element $\neq 0$ in the one-dimensional $\mathfrak t$ is regular.
For $n=3$, the irregular elements in the two-dimensional $\mathfrak t$ are of the form $\pmatrix{xi &0&0 \\
0&x i&0 \\ 0&0&-2xi}$ or $\pmatrix{xi &0&0 \\
0&-2x i&0 \\ 0&0&xi}$ or $\pmatrix{-2xi &0&0 \\
0&x i&0 \\ 0&0&xi}$ i.e. the union of three one-dimensional subspaces. (Exercise: Find the centralisers of each.)
For $n=4$, e.g. the element $\pmatrix{i&0&0&0\\0&-i&0&0\\0&0&0&0\\0&0&0&0}$ has centraliser $\pmatrix{\ast&0&0&0\\0&\ast&0&0\\0&0&\ast&\ast\\0&0&\ast&\ast}$. Exercise: What other elements in $\mathfrak t$ are irregular?
Note that although the examples are compact Lie algebras, nowhere have we really used that. Indeed, the only interesting thing here would be that in a compact semisimple Lie algebra, all elements are semisimple and thus belong to some CSA. Thus your question is actually asking for the centraliser of an arbitrary element in such a Lie algebra.