How To Get Any Object To Move On It's Own

I want to get coins in my game to move by themselves away from the avatar and I want them to be able to go up, down, left, and right. I also want to know how to get an enemy to go towards the avatar.