I am currently reading chapter $15.1$ in Dummit & Foote:s "Abstract Algebra", 3rd edition (the passage below is from page $662$). Before I get to why I am perplexed, note that $V \subset \mathbb{A}^n,W \subset \mathbb{A}^m$. I am somewhat perplexed with the following passage (somewhat changed to avoid confusion)
Suppose that $\phi$ is a $k$-algebra homomorphism from the coordinate ring $k[W] = k[x_1,\ldots,x_m]/I(W)$ to $k[V] = k[x_1,\ldots,x_n]/I(V)$. Let $F_i$ be a representative of the image of $\overline{x}_i \in k[W]$, that is, $\phi(\overline{x}_i+\operatorname{mod}(I(W))) = F_i + \operatorname{mod}(I(V))$. Then we have that $\varphi = (F_1,\ldots,F_n)$ defines a polynomial from $\mathbb{A}^n$ to $\mathbb{A}^m$, and in fact, $\varphi$ is a morphism from $V$ to $W$. To see this it suffices to check that $\varphi$ maps a point of $V$ to a point of $W$ since by definition $\varphi$ is already defined by polynomials. If $g \in I(W) \subset k[x_1,\ldots,x_m]$ then in $k[W]$ we have $$g(x_1 + I(W),\ldots,x_m + I(W)) = g(x_1,\ldots,x_m)+I(W) = I(W) = 0 \in k[W]$$ and so $$\phi(x_1+I(W),\ldots,x_m+I(W)) = 0 \in k[V].$$ Since $\phi$ is a k-algebra homomorphism, it follows that $$g(\phi(x_1+I(W),\ldots,x_m+I(W))) = 0 \in k[V].$$
Okay, this last part that is in italic, is where my confusion stems from. What exactly do they mean here. Is not $g \in k[x_1,\ldots,x_m]$. How does it make sense to define it as taking arguments from $k[V]$?
Perhaps the notation can be confusing. Here's one way of expressing the argument: a map $\phi: k[W] \to k[V]$ is equivalent to a map $\Phi: k[\mathbb{A}^m] \to k[V]$ such that $\Phi(I(W)) = 0$. Let $\Phi(x_i) = y_i$ for $1 \leqslant i \leqslant m$, where $k[\mathbb{A}^m] = k[x_1, \ldots, x_m]$ and $y_i \in k[V]$. Then, we require that for all $f \in I(W)$, $f(y_1, y_2, \ldots, y_m) = 0$.
On the other hand, a regular map $\psi: V \to W$ is a map $\Psi: V \to \mathbb{A}^m$ whose image is contained in $W$, i.e., whose image is in the vanishing locus of any $f \in I(W)$. If the map is $p \mapsto (y_1(p), y_2(p), \ldots, y_m(p))$, where each $y_i \in k[V]$ since $\pi_i \circ \Psi$ must be regular, then the required condition is $f(y_1(p), y_2(p), \ldots, y_m(p)) = 0$ for all $p \in V$, i.e. $(f \circ \Phi)(p) = 0$ on all of $V$. This means that $(f \circ \Phi) = 0$ in $k[V]$.
Thus, the equivalence between maps $\Phi: k[\mathbb{A}^m] \to k[V]$ and $\Psi: V \to \mathbb{A}^m$ under $\Phi = \Psi^*$ yields the equivalence between maps $\phi: k[W] \to k[V]$ and $\psi: V \to W$.
P.S. Your doubt was why $f(y_1(p), y_2(p), \ldots, y_m(p))$ makes sense. Note that although the $y_i$'s are in $k[V]$, their evaluation at $p \in V$ gives a value in $\mathbb{A}^1$, so $(y_1(p), \ldots, y_m(p)) \in \mathbb{A}^m$, and this can be evaluated at $f \in I(W) \subseteq k[\mathbb{A}^m]$.