Imprinting is a process that happens beyond genetics, and is therefore called epigenetic. An epigenetic event can change the expression of a cell’s gene without changing the basic genetic code. During imprinting, one or more molecules are added to the gene, acting as a stop code. These molecules tag the DNA and prevent it from being transcribed into proteins, therefore blocking the expression of that gene.
It isn’t just about stopping genes being expressed. It can also cause otherwise inactive genes to be expressed.
But also, some imprinting behaviour comes from brain development and is not directly related to epigenetics.