Let $R$ be a nonzero ring and assume $a\in R$. Here we do not assume $R$ has a unity or is commutative. According to most of the references (e.g. Dummit and Foote), the principal ideal $(a)$ has a closed form: $$(a)=RaR=\left\{r_1ar_1'+\cdots+r_nar_n'\mid n\geq1, r_i,r_i'\in R\right\}.$$ It can also be shown easily that $RaR$ is a two-sided ideal:
Proof. Set $r=r'=0$, we have $rar'=0a0=0\in RaR$, so $RaR$ is nonempty. Secondly, $$(r_1ar_1'+\cdots+r_nar_n')-(s_1as_1'+\cdots+s_mas_m')=r_1ar_1'+\cdots+r_nar_n'+(-s_1)as_1'+\cdots+(-s_m)as_m'\in RaR.$$ Finally, for every $x\in R$, $$x(r_1ar_1'+\cdots+r_nar_n')=(xr_1)ar_1'+\cdots+(xr_n)ar_n'\in RaR.$$ $$(r_1ar_1'+\cdots+r_nar_n')x=r_1a(r_1'x)+\cdots+r_na(r_n'x)\in RaR.$$ Therefore, $RaR$ is a two-sided ideal of $R$.
Furthermore, we can also show that $RaR$ is contained in every two-sided ideal of $R$ containing $a$.
Proof. Let $I$ be a two-sided ideal of $R$ containing $a$. Then for every $r,s\in R$, we always have $ra\in I$ and hence $ras\in I$. Therefore, $r_1ar_1'+\cdots+r_nar_n'\in I$ as well, implying that $RaR\subseteq I$.
It seems reasonable to conclude that $(a)=RaR$, but I found a problem. If $R$ is not assumed to be commutative or contain a unity $1$, what about the elements of the form $ra$ and $ar$ for some $r\in R$ and $n\cdot a$ for some $n\geq 1$? It seems that they cannot be easily represented easily in the form of elements in $RaR$.
I also referred to this question: In general rings, what do principal ideals look like? and it made me more confused. So I hope if anyone have good ideas or suggestions on this. Any help will be appreciated.