How can I stay in shape while I'm injured and can't play sports?

Try other things. Work out the unaffected parts of your body. For instance if you hurt your right shoulder, then do more with your left arm and legs and do more cardio. Also it may be time to work more on a healthy diet to help you stay in shape. Keep a positive attitude, you'll be back on the field in no time.
Depends. There are always activities that you can perform even while injured. I would suggest aqua therapy as you can do lots of things in the pool while taking some stress of your injured limb.