For $\Bbb{K}[[x]]$ what and where is $x$ in $\sum_{n=0}^\infty a_nx^n$? Consider the set $\Bbb{K}[[x]]$ this MSE question indicates that this is the set of expressions of the form:
$$\sum_{n=0}^\infty a_nx^n\quad \text{where} \quad a_n \in \Bbb{K} $$
I don't understand the meaning of the terms $x^n$. In the most general case what space/field do they live in? and what does the exponent $n$ mean?
 A: Let $R$ be any ring. Then $R[[X]]$ denotes the ring of formal power series over $R$.
Informally, one often simply defines it as the set
$$\Big\{\sum_{n=0}^∞a_nX^n;~a_n ∈ R~\text{for all}~n∈ℕ_0\Big\},$$
and then proceeds to say “Its elements are formal expressions” (without clarifying what formal expressions are) and “This yields a ring when equipped with the suggestive addition and multiplication on it.” One then calls “$X$” a formal variable and leaves it undefined and uninterpreted.
To the formalist, this is of course extremely unsatisfactory. But fortunately, the wikipedia article above gives a formal definition of it here.
Following this definition, “$\sum_{n=0}^∞ a_nX^n$” simply becomes a suggestive notation for the sequence $(a_n)_{n ∈ ℕ_0}$. Again, this might be unsatisfactory. However, if you define $X$ to be the special sequence
$$X = (0,1,0,…),$$
this notation actually makes sense: One may interpret $R[[X]]$ as topological ring which is complete in a certain sense and then the formal series literally becomes
$$\sum_{n=0}^∞a_nX^n = \lim_{N→∞} \sum_{n=0}^N a_nX^n.$$
If you are interested in this viewpoint, I suggest you first read wikipedial on topological rings, specifically the examples section, discussing the $I$-adic topology. You may read further about this in any book on commutative algebra such as Atiyah–Macdonald’s book.
By the way, this trick also works for polynomial rings $R[X]$ (with which I presume you are at least somewhat/intuitively familiar), defining $R[X]$ as a set of sequences in $R$ and $X = (0,1,0,…)$: You just have to restrict yourself to sequences that are nonzero only at finitely many terms. But then, the polynomial $\sum_{n=0}^N a_nX^n$ too really is the sum of monomials $a_nX^n$ and $X^n$ really is the product of some special element $X = (0,1,0,…)$ by itself.
