Many players enjoy playing from away from the table, and some (especially defensive players) base their game on this. Others step back in fast rallies to give themselves more time to react. However, for most players, you want to stay close to the table whenever possible, usually no more than an arm's length back, slightly more for loopers in some fast rallies. Otherwise, you "give up" the table. By backing off the table, your opponent has more time to react to your shots, and you have to cover more ground to cover the wide angles and in and out movements. Basically, you are at the mercy of your opponent if he knows how to take advantage of it.
A looper often needs to play slightly further back then a counter-hitter, but not too far back except when forced. Often a player needs more time because his strokes aren't efficient, or perhaps too long. You might want to work with a coach on making your shots more efficient and shorter.
Against a much faster player, sometimes you have little choice but to back up half or a full step to have time to rally. Sometimes, however, it's best to start the rally closer to the table, so you have a chance to put pressure on your opponent, and only back up when really forced to do so. Don't give up the table for free!
If you have trouble staying at the table during a match, try this remedy. When you practice, put a barrier behind you to make sure you stay within an arm's length or slightly more of the table. You might even exaggerate it some, and really jam yourself at the table (with the barrier right behind you) so that you'll learn to do this. It will pay off in the long run.