How do you make enemies like in pacman?

Please help me on making enemies move by themselves, constantly chasing the player like in pacman and at the same time avoiding walls.
P.S.: I am a beginner.... please don't use hard-to-understand terms in your answer. Thank you.
P.S.: I am a beginner.... please don't use hard-to-understand terms in your answer. Thank you.