Exercise and going back to the gym are very big, important topics. Patients always want to know if they can return, when they can return, what exercises can they return to, which exercises should they not go back to. This is often the one discipline, the one type of thing, that patients tend to not take the advice of the clinician. They tend to go back too early, and tend to go back too soon and too aggressively.
But, by and large, the simple answer is no. If you're having acute or instability in your back, it hurts quite a bit, really struggling with your back, with your functional ideas, and functional tasks, and can barely get through a work day then you're probably dealing with a back that needs almost the opposite of returning to the gym. You almost need a rest period.
The acronym is called PRICE, P-R-I-C-E, for pressure, rest, ice, compression, and elevation. Any two or three of the five usually will be suitable. By and large going home, resting the back, using ice, using some sort of pressure, or lying in the right position to give you some pressure to the back, elevating if there's a swelling issue is usually indicated.
Working out, lifting weights, going to the gym, number one, is going to heat up the tissue. Just, inherently, when you're moving around quite a bit you're going to warm up the tissue and often too much. The area is already hot to begin with. That's why you're suffering a bit. And, number two, you're going to increase the disc pressure by lifting weights, or carrying weights around, lifting them up over your head. So a combination of heating up the tissue more and increasing the pressure on the spinal joints and the discs can further exacerbate the problem and, at best, just slow down the healing process, which is not what you want either.
A simple rest period of three, five, seven days, depending on how bad it is, is usually indicated. Then a slow return back to exercising is usually the goal. If you're in a physical therapy program they will advise you of the same thing depending on your symptoms, and probably give you some tips and some exercises to get back to sooner than later. But a general rule give it three to five to seven days depending on how bad it is.