Good question. Studies show that without specific help or education, patients just don't see which movements to avoid and which activities will help. Sometimes patients don't have a preferred direction so this advice doesn't help.
Your doctor's advice works best for those patients who can find a direction that always causes pain and an opposite direction that relieves pain. The goal is to avoid the painful direction. Activities and exercises in the pain free (preferred) direction are set up.
You may need the advice of a trained professional for this kind of help. Physical therapists trained in the McKenzie Method use this approach. It only takes one session to find your preferred direction. The therapist will help you learn how to "centralize" or bring your pain just to the center of your low back area. If you have pain down the leg, the therapist will show you how to avoid activities and positions that increase your back pain and/or send pain shooting down your leg.
You may need a few follow-up visits to progress your activities and advance the exercises needed to restore your normal, pain free motion.