Gluing produces a coproduct only when you glue along the empty subscheme. In general, if we glue $X$ and $Y$ along maps $U \to X , U \to Y$ together, we want to get the *pushout* (also called amalgamated sum) of the diagramm $X \leftarrow U \to Y$.
 
The answer to the first question is, of course, yes. You can verify the universal property directly. More generally, every limit can be constructed via products and equalizers, which is a fact from basic category theory. In particular, a fiber product of the diagram $A \to C \leftarrow B$ is equal to the equalizer of $A \times B \to A \to C$ and $A \times B \to B \to C$.

Also Sándor Kovács has already pointed you to Karl Schwede's paper in which the second question is answered, let me just say that this article shows that pushouts along *closed immersions* exist and are given locally by the fiber product of rings. But in general, pushouts of schemes do not exist at all. See [this][1] question.

  [1]: https://mathoverflow.net/questions/9961/colimits-of-schemes