Sure, you can make this totally precise. There is no reason to assume $S$ is countable; just let $S$ be any set. Let $T=S\times\{0,1\}$; we think of elements of the form $(s,0)\in T$ as representing "$s$" and $(s,1)$ as representing "$s^{-1}$". Write $\pi_0:T\to S$ for the projection map onto the first coordinate and $\pi_1:T\to \{0,1\}$ for the projection map onto the second coordinate. If $n\in\mathbb{N}$, write $[n]=\{i\in\mathbb{N}:i<n\}$ and say that a word (on $T$) of length $n$ is a function $w:[n]\to T$. Say that a word $w$ is reduced if for all $i<n-1$, if $\pi_0(w(i))=\pi_0(w(i+1))$ then $\pi_1(w(i))=\pi_1(w(i+1))$ (intuitively, this means that your word never has $s$ adjacent to $s^{-1}$). Given a word $w:[n]\to T$, say that another word $w':[n-2]\to T$ is a one-step reduction of $w$ if there exists $i<n-1$ such that $\pi_0(w(i))=\pi_0(w(i+1))$, $\pi_1(w(i))\neq \pi_1(w(i+1))$, and $w'$ is given by the formula $$w'(j)=\begin{cases} w(j) & \text{ if $j<i$} \\ w(j+2) & \text{ if $j\geq i$.}\end{cases}$$ (Intuitively, you are obtaining $w'$ from $w$ by cancelling an adjacent $s$ and $s^{-1}$ appearing in the word $w$).
Write $W$ for the set of all words on $T$ (of any length). Say that a word $w'$ is a reduction of a word $w$ if there exists a natural number $n$ and function $v:[n]\to W$ such that $v(0)=w$, $v(n-1)=w'$, and $v(i+1)$ is a one-step reduction of $v(i)$ for each $i<n-1$. It is then possible to prove the following theorem:
Theorem: Let $w\in W$. Then there is a unique reduced word that is a reduction of $w$.
The proof is a bit messy but not too hard, and uses induction on the length of $w$. Write $r(w)$ for the unique reduced word that is a reduction of $w$.
We need one more ingredient before we can define the free group. Given two words $w:[n]\to T$ and $w':[m]\to T$, define their concatenation $w*w':[n+m]\to T$ by the formula $$(w*w')(i)=\begin{cases} w(i) & \text{ if $i<n$} \\ w'(i-n) & \text{ if $i\geq n$.}\end{cases}$$
We can now define the free group. Let $F(S)$ (the "free group on $S$") be the set of all reduced words on $T$, and define a multiplication $\cdot:F(S)\times F(S)\to F(S)$ by $w\cdot w'=r(w*w')$, i.e. the reduced word obtained by reducing the concatenation of $w$ and $w'$. You can then prove that $(F(S),\cdot)$ is a group.
One way to think about the free abelian group on a set $X$ is that you are taking the elements of $X$ as a starting point, and then making a group operation on those elements that is abelian, but where the elements don't satisfy any relations other than the ones that they absolutely have to to make an abelian group. In particular, the elements of $X$ are viewed here as something like "atoms", and we're building a totally new group operation on them. It doesn't matter at all what they are, just how many of them there are.
In your second example the fact that we built a group from the numbers $1, 2, 3$ doesn't mean that the group operation we're building has anything to do with the usual arithmetic on those numbers. It might help to give the new group operation a new name, say $\ast$. Then elements of the free abelian group on $\{1, 2, 3\}$ will have the form $(a1)\ast(b2)\ast(c3)$, with $a, b, c \in \mathbb{Z}$, and with no further simplification possible. The group we get this way is isomorphic to $\mathbb{Z}^3$, via the function that sends $(a1)\ast(b2)\ast(c3)$ to $(a, b, c)$.
Best Answer
As in the comments: free (abelian group) is not the same as abelian (free group). The order/grouping of words cannot be interchanged, as it happens, (though in a different universe it might have been otherwise), because most free groups are not abelian (that is "abelian (free group)" refers to only one non-trivial thing, $\mathbb Z$), while there are many free (abelian groups).
In both cases the constructions given are typical, but do not clearly explain the function of the things constructed. A simple and standard categorical characterization succeeds in characterizing both: given a category $C$ (of either all groups, or just abelian groups, or possibly some other types of things), so that every object $X$ in $C$ has an underlying set ${\mathrm set}X$ (for example, $X$ is a set plus structure), a free object $F(S)$ in $C$ on a set $S$ is an object in $C$ such that every map of sets $f:S\to {\mathrm set}X$ gives a unique $C$-morphism $F(S)\to X$ (restricting to $f$ on $S$...) We can check that the two constructions you mention succeed in exhibiting free objects in the two categories.
The free group $F(S)$ on a set $S$ does map to the free abelian group $FA(S)$, induced from the identity map $f:S\to S$... so the free abelian group is a quotient of the free group. You can check that the kernel is generated by commutators, unsurprisingly.
EDIT: it might be useful to add another operation here, "abelianization" of a group $G$, which creates the largest quotient ${\mathrm ab}G$ of $G$, with a quotient map $G\to {\mathrm ab}G$. (No, it's not a-priori clear that there is a unique such, etc...) The map from free group on $S$ to free abelian group on $S$ is exactly the abelianization map.