(All my rings and $R$-algbras are commutative and unital.)
Question. I think it makes sense to speak of the "roots" of an element of an arbitary $R$-algebra; a definition is given below. Does it actually make sense, or am I just confused? If it does make sense, where can I learn more? If not, why not; where does my reasoning go wrong?
First, some notation.
Given a function $f : R \leftarrow \{x_1,\ldots,x_{n-1}\}$, let us write $\Phi(f)$ for the corresponding $R$-algebra homomorphism $R \leftarrow R[x_1,\ldots,x_{n-1}].$ Explicitly, we require that $\Phi(f)$ agrees with $f$ when restricted to the domain of $f$.
Given a polynomial $p \in R[x_1,\ldots,x_{n-1}],$ let us write $\mathbf{Ev}_p$ for the corresponding function $$R \leftarrow R^{\{x_1,\ldots,x_{n-1}\}}$$ given by "evaluation." Explicitly, we define that $\mathbf{Ev}_p(f)= \Phi(f)(p)$ whenever $f$ is a function $R \leftarrow \{x_1,\ldots,x_{n-1}\}.$
Definition. Suppose $P$ is an arbitrary $R$-algebra and consider $p \in P$. I was thinking that we can define that a root of $p \in P$ is just a homomorphism $\varphi : R \leftarrow P$ satisfying $\varphi(p) = 0_R.$
If I'm not confused, this (essentially) generalizes the familiar case where $P$ is a polynomial ring. In particular, if $P =R[x_0,\ldots,x_{n-1}],$ then homomorphisms $\varphi : R \leftarrow R[x_0,\ldots,x_{n-1}]$ satisfying $\varphi(p)=0$ are "essentially the same" as functions $f : R \leftarrow \{x_0,\cdots,x_{n-1}\}$ satisfying $\Phi(f)(p)=0,$ which are precisely the functions $f : R \leftarrow \{x_0,\cdots,x_{n-1}\}$ satisfying $\mathbf{Ev}_p(f)=0$, which are precisely the roots of the polynomial $p$.
Is this correct? If so, where can I learn more? If not, where does my reasoning go wrong?
You have essentially found an explicit description of the hom-set $$\mathbf{Alg}_R (P / (p), R)$$ namely as the set of $R$-algebra homomorphism $\phi : P \to R$ such that $\phi (p) = 0$. More generally still, you might ask about "roots" of $p$ in another $R$-algebra $Q$, which would amount to asking about the hom-set $$\mathbf{Alg}_R (P / (p), Q)$$ so the conclusion is that the functor $F : \mathbf{Alg}_R \to \mathbf{Set}$ defined by $$Q \mapsto \{ \phi \in \mathbf{Alg}_R (P, Q) : \phi (p) = 0 \}$$ is a representable functor. Proceeding in this direction (for a very long time) eventually leads to the functor of points approach to scheme theory.