They are two different things.
"Springyness" is called elasticity. This is described by a modulus of elasticity, also for elongation called Young's modulus $Y$. Looking at a stress-strain curve [source] as below, the elasticity is the slope of the straight line in the elastic region.
- If you are not familiar with a stress-strain curve, consider it as a curve resulting from a test of a material. If you pull the material sample with larger and larger stress $\sigma$ (force per area), you attain this curve (strain $\epsilon$ is elongation in the percentage of the original length). The elastic region is where the material returns to its initial state. The plastic region is where permanent deformation is done; it might still be "springy" but will not return all the way to its initial state. (If the curve starts to bend downwards before the failure point, that area is furthermore called necking; but is not shown here.)
"Hardness" is different and is not described by the modulus of elasticity or similar. The more pure and perfect your material microstructure is if it, for example, is a crystal, the softer it is. If there on the other hand are errors in the crystal - errors like dislocations, impurities and other atomical defects as well as other imperfections as grain development - the material gets harder. Then rows of atoms in the lattice of the crystal have a much harder time "stretching", "slipping" and "sliding" around. For lower grain sizes the hardness as a rule-of-thumb increases, called the Hall-Petch rule (though there is a limit).
It is all about adding disturbances to bring tension inside the lattice, keeping the atomic positions fixed. What a heat treatment does, is in fact to trap impurity atoms inside the lattice. The old iron smiths from thousands of years back utilized this without knowing the cause. When they heated up steel, at a certain temperature it changed its stable crystal type. Carbon atoms from the ashes in the open fires were mixed into tiny gaps and spaces in unit cells here and there on the atomical scale. Cooling it down fast (quenching in a bucket of water) closed the lattice and changed the unit cell structure rapidly since the prefered crystal type is different for lower temperatures. Carbon atoms may be trapped, and impurities were hereby added. The steel was much, much harder.
The Japanese Katana Samurai swords from ancient times are examples of mechanical hardening on top of the heating treatment. They hammered the metal flat, folded it, hammered it, foled it, and did this for many, many layers. The resulting microscale disturbances were violent and the crystal structure was full of imperfections and very much harder than typical heat-treated hardened steel.
The microstate changes for different temperatures can be overviewed with a phase diagram like this [source]:
- Pure iron is all the way to the left, and the more to the right you go along the axis, the more carbon is added. Each area is a specific phase, and phases have different crystal types (different atomic arrangements for each unit cell) for different temperatures (and composition). This does not tell how the microstructure looks, just what phases are prefered. Because even at a state of prefered phases in this diagram, you can violently mess up the structure itself by mixing up all the grain orientations from the above-described methods of heat treatment, mechanical treatment etc.
The mechanical properties of a steel object are influenced by the metal composition, and the final heat treatment
and the manufacturing process. If you bend or hammer your object, the strength improves as well. And I believe a spring is a steel wire extruded from a larger steel bulk, wound around a core. $\endgroup$