Why is the functor $S\mapsto\prod_{1\leq j\leq k}\mathcal{O}_{S}^{n}\left(S\right)$ representable by this scheme? Let $S$ be a scheme and $\mathcal {O}_S$ the structure sheaf of rings over $S$. 
Question: Why is the functor $S\mapsto\prod_{1\leq j\leq k}\mathcal{O}_{S}^{n}\left(S\right)$ representable by a scheme that is isomorphic to $\mathbb{A}_{\mathbb{Z}}^{kn}$?
I would say that if such a scheme exists, the reason is that $S\mapsto\prod_{1\leq j\leq k}\mathcal{O}_{S}^{n}\left(S\right)$
is isomorphic to $\mathcal{O}_{S}^{kn}\left(S\right)$, which in turn is representable by $\mathbb{A}_{\mathbb{Z}}^{kn}=\mathrm{Spec}\left(\mathbb{Z}\left[\left(T_{i}\right)_{1\leq i\leq kn}\right]\right)$.
It is also necessary to show that such a scheme exists.
 A: Your question has several errors. 1) $S$ is not fixed. 2) $\mathcal{O}_S$ is not "a structural sheaf", it is the structure sheaf of $S$. 3) The functor is not isomorphic to $\mathbb{A}^{kn}$. It is represented by $\mathbb{A}^{kn}$. 4) $\mathcal{O}_S(S)$ is not a local ring.  5) There is no one-to-one correspondence between $\mathcal{O}_S(S)$ and $\mathbb{Z}$. Nothing can be more wrong than this assertion. 6) It doesn't even make sense to say that $\mathcal{O}_S(S)$ is isomorphic to $\mathbb{A}^d$ since the latter is a scheme and the former is a ring.
I advise you to review the definitions (beginning from basic algebra on) before working with schemes.
To answer your question: The functor $S \mapsto \mathcal{O}_S(S)$ (more precisely: the underlying set of this ring!) is represented by $\mathbb{A}^1$ since $\hom(S,\mathbb{A}^1) \cong \hom(\mathbb{Z}[t],\mathcal{O}_S(S)) \cong \mathcal{O}_S(S)$ (the isomorphism is given by evaluation at $t$). In general, a product of representable functors is represented by the product of the representing objects. Thus, $S \mapsto \mathcal{O}_S(S)^{kn}$ is represented by $\mathbb{A}^{kn}$.
