Why do we have $k[X\times Y] \simeq k[X] \otimes_k k[Y]?$ I am trying to develop an intuition of how to think about the tensor product. I do not find a clear proof that
$$k[X\times Y] \simeq k[X] \otimes_k k[Y]$$
and would like to understand how it works (and why the $k$ in $\otimes_k$ matters so much).
Also, I have the feeling that we can write any polynomial of $k[X\times Y]$ in terms of $X$ coordinates (which are polynomials in $Y$). So that we would also have
$$k[X] \otimes_k k[Y] \simeq k[X][Y]?$$
If it is so, is it a good way to think about tensor product? ($A \otimes_k B$ would be formal sums of elements of $B$ with coefficients in $A$?) i.e. does it generalize or make sense in other setting than polynomial algebras?
 A: Question: "I am trying to develop an intuition of how to think about the tensor product. I do not find a clear proof that
$$k[X\times Y] \simeq k[X] \otimes_k k[Y]$$
and would like to understand how it works (and why the $k$ in $\otimes_k$ matters so much)."
Answer: @Mesmerman - There appears to be some "confusion" with your notation. When you write
$$k[X] \otimes_k k[Y] \simeq k[X][Y]?$$
some people interpret this to mean that $X,Y$ are independent variables over $k$. In this case it follows there is an isomorphism of $k$-algebras $k[X]\otimes_k k[Y] \cong k[X][Y]\cong k[X,Y]$. If $X,Y$ denote affine algebraic varieties over an algebraically closed field $k$ and if $k[X]$ denote the coordinate ring of $X$, it follows $k[X\times_k Y] \cong k[X]\otimes_k k[Y]$. Hence you must make up your mind: what is $X$ and $Y$?
Case 1: Let us assume $X,Y$ are independent variables. There are well defined maps
$$u:k[X]\otimes_k k[Y] \rightarrow k[X,Y], v:k[X,Y]\rightarrow  k[X]\otimes_k k[Y]$$
with
$$u(f(x)\otimes g(y)):=f(x)g(y), v(\sum a_{i,j}x^iy^j):=\sum a_{i,j}x^i\otimes y^j)$$
and you may check that $u\circ v = v\circ u = identity$ hence the two $k$-algebras are isomorphic. If you take a strict subfield $k' \subseteq k$ there is no isomorphism
$$k[X]\otimes_{k'}k[Y] \cong k[X,Y]$$
of $k$-algebras (choose $\mathbb{R} \subseteq \mathbb{C}$): It follows
$$ \mathbb{C}[X]\otimes_{\mathbb{R}}\mathbb{C}[Y] \cong \mathbb{C}\oplus \mathbb{C}[X,Y]:=R[X,Y]$$
and $R:=\mathbb{C}\otimes_{\mathbb{R}} \mathbb{C} \cong \mathbb{C}\oplus \mathbb{C}$ is not a domain. The ring $\mathbb{C}[X,Y]$ is a domain.
Case 2: Let us assume $X,Y$ are algebraic varieties. You are asking a question about why the $k$ in the tensor product matters, for this reason I give an aswer using affine schemes.  There may be more elementary answers to your questions on this site and you find other answers by searching.
First of all: You must understand the "set theoretic fiber product". If $f:X \rightarrow S, g: Y \rightarrow S$ are maps of sets, we define $X\times_S Y$ to be the set of pairs $(x,y)\in X\times Y$ with $f(x)=g(y)$. There is a 1-1 correspondence between maps of sets $\phi: Z \rightarrow X\times_S Y$  and pairs of maps $u: Z \rightarrow X, v:Z\rightarrow Y$ commuting with $f,g$. This property determines $X\times_S Y$ uniquely: Given any other set $T$ with this property there is a unique bijection $X\times_S Y \cong T$ of sets.
There is a similar product for algebraic varieties/affine schemes. We must however take care since an algebraic variety/affine scheme is a set with a topology and a structure sheaf and all maps involved must be maps of varieties/affine schemes. Hence it is not immediate how to construct the fiber product. We may define it via a universal property but we must also show that it exists by giving an explicit construction.
You will find that in Hartshorne, Chapter II.3 they define the fiber product of two affine schemes over $k$ as
$$\text{T1.  }Spec(A)\times_k Spec(B):=Spec(A\otimes_k B).$$
Why do we define the fibre product like this? It is because the tensor product of two commutative $k$-algebras satisfies a certain universal property - hence we must define it as in $T1$ - we have no choice, as I now explain:
There is an exercise in Hartshorne (Ex.II.2.4) that is important:
There is for any scheme $Z$ over $k$ an equality of sets
$$\text{  I1. }Hom_{Sch/k}(Z, Spec(A\otimes_k B)) \cong Hom_{k-alg}(A\otimes_k B, \Gamma(Z, \mathcal{O}_Z)).$$
The fiber product $X\times_k Y$ is uniquely characterized by a universal propety (look this up). Given two maps $f:Z \rightarrow X, g:Z \rightarrow Y$ commuting over $k$, you get two maps of $k$-algebras
$$f^*: A \rightarrow \Gamma(Z, \mathcal{O}_Z), g^*: B \rightarrow \Gamma(Z, \mathcal{O}_Z)$$
commuting over $k$. This gives a canonical map of $k$-algebras
$$f^*\otimes g^*: A\otimes_k B \rightarrow \Gamma(Z, \mathcal{O}_Z)$$
commuting with the obvious maps from $A$ and $B$ and dually a map of $k$-schemes
$$f\times_k g: Z \rightarrow Spec(A\otimes_k B).$$
Note: In the above argument it is essential that the maps are "maps of $k$-algebras" and "maps of $k$-schemes" for the results to hold.
Hence the affine scheme $Spec(A\otimes_k B)$ satisfies the universal property of the fiber product (over $k$) of the two schemes $Spec(A)$ and $Spec(B)$ - this uniquely characetrize the fiber product. There is a 1-1 correspondence between maps
$$f:Z \rightarrow Spec(A), g:Z \rightarrow Spec(B)$$
commuting with the projection maps and maps $Z \rightarrow Spec(A\otimes_k B)$ over $k$.
Question: "I do not find a clear proof that
$$k[X\times Y] \simeq k[X] \otimes_k k[Y]$$
and would like to understand how it works (and why the $k$ in $\otimes_k$ matters so much)."
Hence there is a canonical isomorphism of $k$-schemes
$$\eta: Spec(A)\times_k Spec(B) \cong Spec(A\otimes_k B) .$$
In fact: In Hartshorne,  the fiber product for affine scheme is defined using the tensor product over $k$. The above proves that  $Spec(A\otimes_k B)$ satisfies the correct universal property.
So you neet to be careful about the base ring $k$ (or base scheme $S$) and always assume your maps are defined over $k$ (or $S$).
Note: Try to understand it for affine schemes and then generalize using the equality $I1$. The fiber product is defined in Hartshorne, pg 87 and is uniquely determined by a universal property: There is a unique scheme satisfying this property. Try to prove this fact as well.
Example: Let $C$ be any $k$-algebra. There is a 1-1 correspondence between pairs of maps of $k$-algebras
$$f:A \rightarrow   C, g:B \rightarrow C$$
"commuting over $k$"  and maps of $k$-algebras
$$f\otimes_k g:A\otimes_k B \rightarrow C.$$
The map above is defined as $f\otimes_k g(a\otimes b):=f(a)g(b)$. Hence $Spec(A\otimes_k B)$ satisfies the universal property of the fiber product (over $k$) "for affine schemes". Using $I1$ this globalize to any $k$-scheme.
Note: There is an exercise in Hartshorne (HH.I.3.15) which relates the tensor product of $k$-algebras to products of affine algebraic varieties. Hence if you are not familiar with affine schemes, this exercise is interesting for you. It proves that you may use the tensor product to construct products of affine algebraic varieties over any algebraically closed field.
If $X\subseteq \mathbb{A}^n_k, Y\subseteq \mathbb{A}^m_k$ are affine algebraic varieties in the sense of HH.CH.I, it follows the tensor product $A(X)\otimes_k A(Y)$ is again an integral domain.
It follows the ideal
$$I(X)+I(Y) \subseteq k[x_1,..,x_n,y_1,..,y_m]$$
is a prime ideal and that $A(X)\otimes_k A(Y) \cong k[x_i,y_j]/(I(X)+I(Y))$. Hence we may similarly define the irreducible variety
$$X\times_k Y:=Z(I(X)+I(Y)) \subseteq \mathbb{A}^{n+m}_k.$$
By the same reasoning, the variety $X\times_k Y$ is a "product in the category of affine varieties over $k$" in the sense of HH.CH.I. Hence in some sense it is more difficult to prove existence of the fiber product for classical algebraic varieties over an algebraically closed field $k$ - you need to prove that the tensor product $A\otimes_k B$ of two integral domains $A,B$ is again an integral domain. This follows from the nullstellensatz. From this it follows that for any pair of maps $f:Z \rightarrow X, g: Z \rightarrow Y$ of varieties over $k$, there is a unique fiber product map
$$(f,g): Z \rightarrow X\times_kY$$
with
$$(f,g)(z)=(f(z),g(z))$$
for any $z\in Z$. The map $(f,g)$ commutes with the projection maps $p,q$.
This is an important construction in algebraic geometry since many schemes/varieties are constructed using such fiber products:
Example: The fiber of a map. If $\phi: Spec(B) \rightarrow Spec(A)$ is any map of affine schemes, it follows the fiber $\phi^{-1}(\mathfrak{p}) \cong Spec(\kappa(\mathfrak{p})\otimes_A B)$ may be defined using the tensor product
$\kappa(\mathfrak{p})\otimes_A B$, where $\kappa(\mathfrak{p})$ is the residue field at $\mathfrak{p}$.
