Ideal npc walking code

ahm, just wanna ask on how can i make my npc walk around the stage. the animations of walking are all done, i only need a code on how can i implement it. thanks guys.