Q:

How can I find a presentation for the diagonal of a morphism of affine schemes?

I'm trying to understand how to come up with a presentation of the diagonal of an (affine) morphism of affine schemes. For example, consider
$$
\begin{matrix}
\textbf{Spec}\left(\frac{\mathbb{C}[t,x,y]}{xy - t}\right) = X\\
\downarrow \phi \\
\textbf{Spec}(\mathbb{C}[t]) = Y
\end{matrix}
$$
given by the map sending $t \mapsto t$. How can I find the ideal generating the image of the diagonal map $\Delta_{X/Y}$?

A:

As noted in comments, the diagonal morphism  $$\operatorname{Spec} B \to  \operatorname{Spec} B\times_{\operatorname{Spec} A} \operatorname{Spec} B$$ corresponds to the morphism $$B\otimes_A B \to B$$ given by multiplication, whose kernel is generated by elements of the form $b\otimes 1 - 1 \otimes b$ (as $b$ runs through elements of $B$).
More geometrically, if $B$ is of finite type over $A$, say a quotient of $A[x_1,\ldots,x_n]$, so $\operatorname{Spec} B$ is closed inside $\mathbb{A}^n_A$ (where $x_1,\dots,x_n$ are the coordinates on $\mathbb{A}^n$), then $\operatorname{Spec} B\times_{\operatorname{Spec} A} \operatorname{Spec} B$ is closed inside $\mathbb A^{2n}_A$, say with coordinates $x_1,\ldots,x_n,y_1,\ldots,y_n$, and the diagonal is cut out by the equations $x_i = y_i$.
If we go back to rings, then the isomorphism
$$A[x_1,\dots,x_n , y_1,\dots,y_n] \cong A[x_1,\dots,x_n]\otimes_A A[x_1,\dots,x_n]$$ is obtained by identifying $x_i$ on the left with $x_i\otimes 1$ on the right, and by identifying $y_i$ on the left with $1\otimes x_i$ on the right.  So we have just rewritten the equations
$x_i\otimes 1 = 1 \otimes x_i$ in a more transparent form.
If $b_i$ denotes the image of $x_i$ in $B$, then you can check that the ideal generated by the elements $b_i \otimes 1 - 1 \otimes b_i$ contains the elements $b\otimes 1 - 1 \otimes b$ for every $b \in B$.
Turning to your specific example, and using (as you do) $x,y$ to denote coordinates in $\mathbb A^2$, and then using $x,y,u,v$ to denote coordinates in $\mathbb A^4$, we find that $X\times_Y X$ is the subvariety $xy = uv = t$ of $\mathbb A^4_{\mathbb C[t]}$, and the diagonal is cut out by $x = u$ and $y = v$, or equivalently $(x\otimes 1 - 1\otimes x, y\otimes 1 - 1\otimes y)$, as you wrote in comments.
It's natural that you need two equations, since you are cutting out the diagonal copy of $\mathbb A^2$ inside $\mathbb A^4$.  If your affine scheme was described as living in $\mathbb A^n$, then (as we saw above) you would have $n$ equations cutting out the diagonal.
As for your comment about the situation seeming odd, note that $xy = uv$ is a singular cone in $\mathbb A^4_{\mathbb C}$, and the diagonal copy of $X$ (which is isomorphic to $\mathbb A^2_{\mathbb C}$; note that $\mathbb C[x,y,t]/(xy - t) \cong \mathbb C[x,y]$) is a Weil divisor that is not a Cartier divisor, and so you need two equations to cut it out, not just one.
As a general suggestion, when you have affine schemes that are manifestly presented as closed subschemes of affine space, as in your example, it is normally easier and more intuitive to work geometrically, inside products of affine spaces as I did above, then with rings.  (The equation $x = y$ is familiar from high school, and easier to think about than the mysterious looking $x\otimes 1 = 1 \otimes x$.)

