Spines are indicative of excitatory synapses. Excitatory synapses are often increased following long-term potentiation. Long-term potentiation is believed to be a chief mechanism of learning. Thus, increased spines ~ learning.
Also, there is much evidence linking spine density with memory formation