Mechanisms
Postsynaptic NMDA receptors are highly sensitive to the membrane potential (see coincidence detection in neurobiology). Due to their high permeability for calcium, they generate a local chemical signal that is largest when the back-propagating action potential in the dendrite arrives shortly after the synapse was active (pre-post spiking). Large postsynaptic calcium transients are known to trigger synaptic potentiation (LTP). The mechanism for spike-timing-dependent depression is less well understood, but often involves either postsynaptic voltage-dependent calcium entry/mGluR activation, or retrograde endocannabinoids and presynaptic NMDARs.
Read more about this topic: Spike-timing-dependent Plasticity