The coproduct of rings (with $1$) looks somewhat similar to the coproduct of groups or monoids (aka free products), but that we use $\otimes_\mathbb{Z}$ instead of $\times$. In fact, both are special cases of a general construction which works for monoid objects in arbitrary cocomplete monoidal categories.
The coproduct $R \sqcup S$ of two rings $R,S$ is constructed as follows: Let us denote the underlying abelian groups also as $R,S$. Then consider the direct sum of tensor products of abelian groups
$\mathbb{Z} \oplus R \oplus S \oplus \bigl(R \otimes S\bigr) \oplus \bigl(S \otimes R\bigr) \oplus (R \otimes S \otimes R) \oplus \bigl(S \otimes R \otimes S\bigr) \oplus \cdots$
Now we quotient out the relations
$$x_1 \otimes \cdots \otimes x_n \equiv x_1 \otimes \cdots \otimes x_n \otimes 1 \equiv 1 \otimes x_1 \otimes \cdots \otimes x_n,$$
$$\cdots \otimes x_i \otimes 1 \otimes x_{i+1} \otimes \cdots \equiv \cdots \otimes x_i x_{i+1} \otimes \cdots.$$
The quotient has a multiplication characterized by
$$(x_1 \otimes \cdots \otimes x_n ) \cdot (y_1 \otimes \cdots \otimes y_m) := $$
$$\left\{\begin{array}{ll} x_1 \otimes \cdots \otimes x_n \otimes y_1 \otimes \cdots \otimes y_m & x_n \in R, y_1 \in S \text{ or } x_n \in S, y_1 \in R \\ x_1 \otimes \cdots \otimes x_n y_1 \otimes \cdots \otimes y_m & x_n,y_1 \in R \text{ or } x_n,y_1 \in S\end{array}\right.$$
We obtain a ring $R \sqcup S$ with homomorphisms $R \rightarrow R \sqcup S \leftarrow S$. It is the coproduct: Given homomorphisms $f : R \to T$ and $g : S \to T$, we define a homomorphism $h : R \sqcup S \to T$ by mapping, for example $x_1 \otimes x_2 \otimes x_3 \in R \otimes S \otimes R$ to $f(x_1) \cdot g(x_2) \cdot f(x_3)$. This is clearly a homomorphism of abelian groups on the infinite direct sum, but it respects the relations and therefore extends to a homomorphism of abelian groups on the quotient. It is the unique ring homomorphism satisfying $h|_R = f$ and $h|_S =g$.
The construction of $R \sqcup S$ is somewhat complicated, but notice that its elements are just formal sums of products taken from $R$ or $S$, for example $r_1 + s_1 \cdot r_2 - r_3 \cdot s_2 \cdot r_4$. This is how one comes up with the construction.
If $k$ is a commutative ring, then coproducts of $k$-algebras (with $1$) can be described exactly in the same way, we just take $\otimes_k$ instead of $\otimes_{\mathbb{Z}}$. The coproduct of rngs (rings without $1$) is also similar, even a bit easier, see here.
As with all algebraic structures, coproducts can also be described using generators and relations: If $R \cong \mathbb{Z}\langle X \rangle / I$ and $S \cong \mathbb{Z} \langle Y \rangle / J$ are quotients of free rings (for sets of variables $X,Y$ and ideals $I,J$), then
$$R \sqcup S = \mathbb{Z} \langle X \sqcup Y \rangle / (I+J).$$
This description is very useful when presentations of $R$ and $S$ are known. For example, we get $\mathbb{Z} \langle x,y \rangle / (x^2-y^3) \sqcup \mathbb{Z} \langle u,v,w \rangle / (u^2-vw) = \mathbb{Z} \langle x,y,u,v,w \rangle / ( x^2-y^3, u^2-vw)$. Basically, this approach uses the forgetful functor $\mathbf{Ring} \to \mathbf{Set}$ to construct coproducts of rings with the help of coproducts of sets.
Your idea, using the forgetful functor $U : \mathbf{Ring} \to \mathbf{Mon}$ (forgets addition) and its left adjoint $\mathbb{Z}[-]$, the monoid algebra (over $\mathbb{Z}$), can also be made to work: We can construct the coproduct of two rings $R,S$ as $\mathbb{Z}[U(R) \sqcup U(S)]/I$, where the ideal $I$ is generated by the relations $[r+r'] \equiv [r] + [r']$ for $r,r' \in U(R)$ (where $[r]$ denotes the image of $r \in U(R)$ in the monoid ring) and $[s+s'] \equiv [s] + [s']$ for $s,s' \in U(S)$. These relations exactly guarantee that the cospan of monoid homomorphisms
$$U(R) \to U(\mathbb{Z}[U(R) \sqcup U(S)]) \leftarrow U(S)$$
lifts to a cospan of ring homomorphisms
$$R \to \mathbb{Z}[U(R) \sqcup U(S)]/I \leftarrow S.$$
But we may also use the forgetful functor $V : \mathbf{Ring} \to \mathbf{Ab}$ (forgets multiplication) and its left adjoint $T : \mathbf{Ab} \to \mathbf{Ring}$, the tensor algebra (over $\mathbb{Z}$). We construct the coproduct of two rings $R,S$ as $T(V(R) \oplus V(S)) / J$, where $J$ is the ideal generated by the relations $[1_R] \equiv 1$, $[rr'] \equiv [r] [r']$, $[1_S] \equiv 1$, $[ss'] \equiv [s] [s']$. These relations exactly guarantee that the cospan of abelian group homomorphisms
$$V(R) \to V(T(V(R) \oplus V(S))) \leftarrow V(S)$$
lifts to a cospan of ring homomorphisms
$$R \to T(V(R) \oplus V(S)) / J \leftarrow S.$$
More generally, if $\tau' \to \tau$ is any morphism of algebraic theories, there is a forgetful functor $U : \mathbf{Alg}(\tau) \to \mathbf{Alg}(\tau')$ with a left adjoint $F$, and colimits in $\mathbf{Alg}(\tau)$ can then be constructed using colimits in $\mathbf{Alg}(\tau')$ by generalizing the construction above, namely $\mathrm{colim}_i A_i$ for $\tau$-algebras $A_i$ is a suitable quotient algebra of $F(\mathrm{colim}_i U(A_i))$.