How can epigenetic changes be erased if they are inherited?
I have done a presentation in epigenetics and the main topic was imprinting.
This paper will answer all your questions https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3941233/
I am adding some glimpses from this  paper here
Mammals are diploid organisms whose cells possess two
matched sets of chromosomes, one inherited from the mother
and one from the father. Thus, mammals have two copies of
every gene. Normally both the maternal and paternal copy of
each gene has the same potential to be active in any cell.
Genomic imprinting is an epigenetic mechanism that changes
this potential because it restricts the expression of a gene to
one of the two parental chromosomes. It is a phenomenon
displayed by only a few hundred of the approximately 25,000
genes in our genome, the majority being expressed equally
when inherited from either parent. Genomic imprinting affects
both male and female offspring and is, therefore, a consequence
of parental inheritance, not of sex. As an example of
what is meant by this, an imprinted gene that is active on a
maternally inherited chromosome will be active on the maternal
chromosome and silent on the paternal chromosome in
all males and females.

Hope this help and please ask if you do not understand the paper.Thank you