In order to achieve the moonwalk and have it appear effortless, there needs to be as little friction between the feet and the floor as possible. Because of this, a smooth soled shoe is perfect for the move. For just starting off, socks are great because there is almost no friction at all.
The dance surface is almost as important as the footwear. The surface needs to be smooth. The kitchen floor is usually the best place to practice in the house. Smooth wood floors and lanolin surfacing also work well.
When starting the moonwalk, your feet should only be a few inches away from each other. Place the right foot behind you, heel in the air and toe to the ground. The left foot should be slightly ahead of you, completely on the ground.
With your right foot still behind you, slide your left foot backwards until it is behind your right foot. When first starting off, it is best to keep your slides short, until you get the hang of it. While your left foot is reaching the end of its glide, begin to raise its heel in the air. When the foot comes to a complete stop, the heel should be completely in the air and the toes pointing to the ground. At the same time, your right foot should be lowering to the ground. It should be flat on the ground right when your left foot has stopped and the heel is in the air. Now repeat the steps, only with the right foot sliding backwards.
Remember, "The King of Pop" probably didn't learn the moonwalk overnight, so don't expect yourself to either. It will take some time to master the move. As you begin to feel more comfortable with it, increase the length of your glides. This will increase the illusion of the moonwalk.