Understanding of connection between $\operatorname{Spec}k[x_1,\dots,x_n]$ and $k[x_1,\dots,x_n]$ Let $\mathbb{A}^n_k$ be defined as the set $\{(a_1,\dots,a_n):a_i\in k\}$. There are standard maps $Z$ and $I$. The former assigns to an ideal its zero set and the latter assigns to a subset of $\mathbb{A}^n_k$ the ideal of the subset, i.e., the set of all polynomials which vanish at all points of that subset. If $k$ is algebraically closed, then the Nullstellensatz says that $I(Z(J))=\sqrt{J}$.
What if we replace $\mathbb{A}^n_k$ with $\operatorname{Spec}k[x_1,\dots,x_n]$? Then the map $Z$ can be replaced with another map $Z$ which assigns to an ideal $I$ the set of all prime ideals in $k[x_1,\dots,x_n]$ containing $I$, $Z(I)$. (And just like the sets $Z(I)$ in the previous paragraph are the closed sets for the Zariski topology on $\mathbb{A}^n$, the sets $Z(I)$ that I have just described, are the closed sets for the Zariski topology on $\operatorname{Spec}k[x_1,\dots,x_n]$.) But what about the map $I$ from the previous paragraph? Does it have an analogue in this case? That is, does there exist a map $I: \operatorname{Spec}k[x_1,\dots,x_n]\rightarrow k[x_1,\dots,x_n]$? How it is defined if so? Further, is it true that these new $I$ and $Z$ also satisfy $I(Z(J))=\sqrt{J}$? If so, does it follow from the analogous fact above? 

Yes, for $X\subset\operatorname{Spec}k[x_1,\dots,x_n]$, you take
$$I(X)=\bigcap_{\mathfrak p\in X}\mathfrak p.$$
In particular, when $X=Z(J)$, we see $I(Z(J))$ is the intersection of all prime ideals containing $J$, and if you know some commutative algebra then it's just about trivial that $I(Z(J))=\sqrt J$.
