Let me start by saying that I've just started studying algebraic geometry. I have a habit of trying to find out something about the motivation behind new concepts that I'm studying, in this case that means that I'm trying to find out something about how the concept of schemes arose in algebraic geometry, and how to view schemes from a historical perspective.
“A story says that in a Paris café around 1955 Grothendieck asked his friends “what is a scheme?”
The very first time the word “schéma” was uttered, in Paris, at an official seminar talk, was during the Cartan seminar of 1955/56 on algebraic geometry.
The lecturer was Claude Chevalley, and the date was december 12th 1955.
The history is simple:-) Schemes were invented by Grothendieck. The purpose was unification and simplification of the foundations of algebraic geometry.
The general idea is to shift from considering points of a manifold to certain ideals of a ring of functions on this manifold. This general idea evolved gradually. An early predecessor was Gelfand's theory of commutative Banach algebras, where he starts with an algebra and recovers a space so that this algebra is the algebra of functions on this space. The points of the space are defined as maximal ideals. Grothendieck did similar thing in algebraic geometry. He proposed to consider prime ideals of a ring as points of certain space.
For the reference on Grothendieck's original text see "Elements de geometrie algebrique" on Wikipedia. I believe it was never completely published but various versions were widely circulated. So there is no well-defined publication year. Grothendieck worked and reworked it for almost 10 years ending around 1970.
"The term itself was coined by Chevalley, although accepted in a more restrictive sense than the term as used by Grothendieck. In Foundations of Algebraic Geometry, André Weil had introduced into algebraic geometry the methods used by his mentor, Élie Cartan, in differential geometry (following Carl Friedrich Gauss and Jean Darboux). But Weil’s method was by no means intrinsic, and Chevalley wondered what was invariant, in Weil’s sense of variety. The answer, inspired by Zariski’s work, was simple and elegant: the scheme of an algebraic variety is the collection of local rings of the sub-varieties found inside the rational function field. There is no need for an explicit topology, a point of distinction between Chevalley and Serre, who at roughly the same time introduced his algebraic varieties using Zariski topologies and sheaves. Each of the two approaches had advantages, but also limitations: Serre had an algebraically closed base field; Chevalley had to work only with irreducible varieties. In both cases, the two fundamental problems of products of varieties and base change could only be approached indirectly. All the same, Chevalley’s point of view was better suited to future extensions to arithmetic, as Nagata soon observed.
Évariste Galois was certainly the first to notice the polarity between equations and their solutions. One must distinguish between the domain in which coefficients of the algebraic equation are chosen and the domain in which solutions are sought. Grothendieck created a synthesis out of these ideas, based in essence on the conceptual presentation of Zariski-Chevalley-Nagata. Schemes are thus a way of encoding systems of equations as well as the transformations to which one may subject them.
Grothendieck presented the Galois problem in the following manner: a scheme is an absolute object, X, say; the choice of a field of constants (or a field of definition) corresponds to the choice of another scheme S and a morphism πX from X to S. In the theory of schemes, a commutative ring is identified with a scheme, its spectrum. A homomorphism from ring A to ring B likewise maps, inversely, the spectrum of B into the spectrum of A. Moreover, the spectrum of a field has a single underlying point (even though many different points exist, in this sense); consequently, giving the field of definition as being included in the universal domain corresponds to giving a scheme morphism πT from T to S. A solution of the system of equations X, with the domain of constants S, with values in the universal domain T, corresponds to a morphism φ from T to X such that πT is the composition of φ and of πT."