when I check from the dictionary, both "impfen" and "animpfen" seem to mean "to inoculate". but is there any difference between the two?
The prefix an in animpfen could literally be translated to onto in this case. A synonym to animpfen would be beimpfen (prefix be).
Wikipedia lists Animpfen / Beimpfung as colloquial terms for Inokulation:
Als Inokulation (umgangssprachlich auch Animpfen oder Beimpfung) wird in der Mikrobiologie und Zellbiologie das Hinzufügen eines replikationsfähigen Objekts (z. B. eine Zellkultur oder Pathogene wie Viren oder Prionen) auf eine Zellkultur bezeichnet.
It seems that this medical term is more sharply defined in German than in English. Basically Inokulation describes the transfer of a cell culture or pathogen onto another cell culture.