Injuries can happen whether you play sport, workout, keep fit, go to work, pretty much anywhere! As annoying as they are, you can't rush the recovery time.
I have had a wrist injury for 6 and a half weeks now, still unsure what caused it, but my best guess would be during a dumbbell workout. It has annoyed me big time, I hate being unable to workout and at times I have thought 'Ah sod this, just workout and put up with it!' - I'm glad I never did that!
When you have an injury and there is pain there, it's your body's way of telling you to stop and let it rest and heal. If you try and carry on with your activities (whatever they may be) you're simply going to make the injury worse, or even permanent. You need to let your body recover properly, so that when you can go back to whatever you were doing, you won't have to worry about it, constantly thinking it's 'going to go' again.
Depending on your situation and goals, if you injure one part of your body, you could work on other parts. For example, if you injure your shoulder, you could still work on your legs and abs (as long as the exercises you do don't hurt your shoulder). So there are ways around injuries, but sometimes you simply need to rest it. Your body is an amazing machine, it does heal itself, but only if you give it the chance.
I have found out that whilst waiting for my wrist to recover, as annoying as it is, I know I have made the right decision by resting it, so that when I can start working out, I know I won't have to worry about my wrist.
So for you guys out there that have injuries, be smart, let your body heal, DON'T try and work through the pain - I know there is a saying of 'no pain no gain', but when it comes to injuries, anyone who works through an injury is insane!