IANA neuroscientist, so please correct me if I'm wrong or oversimplifying:
IIRC one of the main cellular mechanisms thought to underlie memory is LTP(Long Term Potentiation) in glutamatergic neurons. There are different kinds of glutamate receptors, but we're interested in the two subtypes of ion channel based(ionotropic) Glut receptors, AMPA and NMDA.
AMPA is sort of your main receptor for propagating signals: it's activated first.
NMDA is much more complicated in that it requires binding both glutamate and another neurotransmitter, glycine, for the ion channel to open. But this ion channel can also be blocked by Mg²+ ions, which for reasons that currently escape me, is removed when the neuron depolarizes. Once NMDA is open, it has the downstream effect of upregulating the AMPA receptor, making more sensitive to future transmission, hence serving as a kind of "memory" of previous signals. I think the open question is more about understanding how memory as we know it emerges out of networks of these neurons, and less about the basic cellular mechanisms. And this is probably only one mechanism of LTP, then you have its opposite, Long Term Depression, which is also involved.
Of course, in science the answer is always more complicated than what can be gleaned from the hand-wavey explanations of some programmer on HN :)