Liapin wrote: Two-sided ideals are also all the possible unions of principal two-sided ideals. I get this as:
If $I$ is an ideal of $S$ then for $a_1...a_k\in S$ we have $I= \cup(a_i)$.
Also, I think $a_i\in S$ can be chosen from $D$-classes' representatives of $S$ because they form a partition of $S$. Am I right?
Let $S$ be a semigroup and let $S^1$ be the semigroup equal to $S$ if $S$ is a monoid and equal to $S \cup \{1\}$, where $1$ is a new identity element, otherwise. This notation is useful in the context of two-sided ideals because if $X$ is a subset of $S$, then the two-sided ideal generated by $X$ is $S^1XS^1$.
In particular, a subset $I$ of $S$ is a two-sided ideal if and only if $I = S^1IS^1$. Thus, if $I$ is a two-sided ideal, then $$ I = S^1IS^1 = S^1(\bigcup_{s \in I}\{s\})S^1 = \bigcup_{s \in I} S^1sS^1 $$ and hence $I$ is the union of the principal two-sided ideals $S^1sS^1$, where $s \in I$. Conversely, let $(S^1s_jS^1)_{j \in J}$ be a family of principal two-sided ideals and let $X = \{s_j \mid j \in J\}$. Then $$ \bigcup_{j \in J} S^1s_jS^1 = S^1XS^1 $$ is a two-sided ideal. This is the meaning of Ljapin's statement.
I am not sure to follow your first remark but for the second one, yes: if $I$ is a two-sided ideal, then $$ I = \bigcup_{s \in I/\mathcal{D}} S^1sS^1 $$ where the notation $s \in I/\mathcal{D}$ means that you select only one representative of each $\mathcal{D}$-class contained in $I$.