Rather than starting out the wrong way and picking up bad habits that are hard to get rid of later, I'll give you some simple tips that will put you on the right track for the future.
What is Good Footwork?The point of using footwork is to get you to the ball so that you can hit the same stroke as much as possible. Good footwork allows you to consistently use your best technique, instead of having to stretch, be cramped, or bend from the waist.
Good footwork is not just about sheer speed. It's also about moving the right amount at the right time. A slow player who moves correctly will have better footwork than a quick player who goes to the wrong place, or with his feet the wrong way around.
One of the most common errors I see from beginners is what I call the 'all or nothing' syndrome. This is the habit beginners have of not moving their feet at all if they can stretch for the ball, even though this puts them off balance. Then, for balls that they can't reach by stretching, they move too far, and actually get too close to the ball, cramping their stroke. You can avoid this problem by remembering to always move to the ball, even if you only move six inches or so. Get in the habit of moving into position, and you will soon be able to get into the right position to hit the ball, whether it is near or far away.
When your opponent hits the ball very hard, you may find that you do not have time to move your feet at all. When this happens, leaning a little to the left or right to reach the ball may be necessary and unavoidable. But move whenever you can, you'll be better balanced to hit the ball, and you'll be able to recover for the next stroke more quickly.
Footwork - the Basic Ready PositionTry to position yourself so that you are always just slightly to the left of the middle of all possible angles your opponent can hit, assuming you are a right hander. This will give you the best chance of being able to reach the ball no matter where he hits it. You stand a little to the left of the middle of all angles because you can reach further to the right (on your forehand) than on your backhand, and because your forehand is hit on the right hand side of your body, while your backhand is hit in front of your body. See my article on base positioning for a more in-depth explanation of this concept, along with explanatory diagrams.
Your shoulders should be facing square to where the ball is coming from, and your feet should be as far apart as you can comfortably put them - about one and a half times your shoulder width is a good rule of thumb. Place your feet also facing the ball, and then move your right foot about six inches to a foot further back than the left foot, and you will have your basic ready position. The right foot is placed further back to allow you to transfer your body weight slightly backwards and forwards when hitting your forehand. If you have your feet too square you will not be able to hit with full power. Having the right foot further back will not affect your backhand much, since there is not much weight transfer on the backhand stroke.
Get on the balls of your feet - not your toes and not your heels. Too much on your toes and you'll tend to overbalance forwards, and too much on your heels and you'll tend to lean backwards too much. Make sure your knees are bent, and you should have a slight crouch and a little amount of forward lean. Keep your feet light - some players like to bounce from one foot to another, and others like to jump on both feet at once. Use whichever you like, but keep moving - it's easier to get around if you are not standing still.
For balls that are table height or lower, bend your knees more to get down to the ball, rather than bending from the waist. Using your knees allows you to hit the ball using your normal technique, while bending from the waist changes the way you have to swing, since your body is now leaning over. Try both ways and you will see what I mean.
Keep your crouching position as much as you can while playing - this helps keep your center of gravity low, and will help you move around the court more smoothly. Standing up straight will raise your center of gravity, lock your knees and impair your ability to balance and move quickly.