The dictionary definition of exercise is any physical activity that is planned, structured, and repetitive for the purpose of conditioning any part of the body. Certainly this is true, but the fact is that any activity of any kind whatsoever is exercise, and in regards to your health any exercise is better than no exercise. Several decades ago common wisdom was to advise a patient suffering from acute back pain to get several weeks of complete bed rest to manage the pain which is clearly the opposite of exercise. While this may make it feel better faster it adds significantly to the time needed for a complete recovery and a return to normal activities. Better advice today is to remain as mobile as possible without increasing the pain.
Common sense goes out the window on the topic of back pain primarily because the joints of the spine cannot be seen. Strained and sprained ankles are nearly as common as strained and sprained backs but don't cause nearly the same confusions and conflicting advices because the proper handling is evident to any competent observer who can pull off a sock. Think about it, if you stepped in a hole and severely twisted your ankle, and it were purple, green, and yellow and swollen to twice its normal size would you take a pain pill and walk around all day anyway? I suspect you would elevate it, ice it, and not walk at all except for essential trips to the bathroom. If it were bad enough and you suspected the possibility of a fracture an x-ray would be indicated but even if it were not broken you wouldn't suppose it was just fine and assume that more exercise would be just dandy. A few day later as the inflammation subsides and the pain lessens you would switch to heat to speed the healing process and begin walking slowly, short distances, and on even surfaces. However, it would likely be weeks before jumping off the back of a truck or kicking a soccer ball might be considered. Simply put, the proper handling of any joint pain including the joints of the spine is to resume normal activity slowly and within the limits of pain tolerance by allowing or listening to the pain and letting it be your guide.
It is important to understand that pain is not the enemy, it is no more and no less than the body's warning system that a physical or chemical stimuli has stressed your body beyond its ability to compensate. Like a shrieking smoke alarm, annoying though it may be, pain is not the problem but is the signal that there is a problem. Turning off the pain with a pill, a potion, or a lotion or lying motionless in the bed without addressing the cause of the pain is no smarter than turning off the smoke alarm without fighting the fire and can have results that are just as devastating. Another school of thought is "no pain / no gain" - extreme in the opposite direction. As is true with most things the optimum solution lies within the middle.