Fear of something is associated with fearful situations. In order to remove or erase a memory one needs to bring in the same triggers in a safe environment. If a memory is manipulated in a safe way, it can erase the bad memory to make way for a new one.
Erasing Bad Memories
If a child has gone for bungee jumping and in that process he has fallen and was hurt, it created a fear of heights in him as he associated heights with the fall. One year later that child can be taken bungee jumping at a different place where there are soft materials on the ground to support. So now when the child falls he has a soft cushion to support and he enjoys jumping. So a fear memory has been tampered with a safer option and as time passes the bad memory of the fall is erased.