Start slow. This should be self-explanatory, but it's really not. Most people start training way too fast when dealing with injuries. This makes their injuries worse and then they end up back to square one. It's a real tragedy. Think about it like running. You walk before you jog, jog before you sprint, and sprint before you do backflips. I think. I've never done a backflip.
Only train with people you trust. You know the crazy guy who does backflips for no reason and cranks submissions like his training partner is the spiritual embodiment of his high school bully? Yeah, maybe avoid training with that guy until you're a bit more healthy. Just like love - if you choose the wrong partner you're going to get hurt.
Work on specific skills. I've been dealing with some torso injuries of late. Once I got comfortable getting back on the mat, I'm mostly using my training time to work on hand-fighting and leg lock defense pretty much every day. You can train around most injuries if you train smart.
Skip rolling. Rolling is the most fun part of Jiu-jitsu training, but unfortunately, the last thing you will be able to do at full speed when working your way back from a serious injury. I've injured basically everything in my body and nothing has ever kept me off the mat for more than a few weeks.
Figure out when to stop. There are times when you should be pushing yourself, there are other times when you should leave energy in the tank to fuel healing and recovery. Get to know your body and how to push appropriately given your injury.