Physics of Learning and Memory Formation