Almost all athletes at one point will go through the process of sport rehabilitation. While suffering from an injury can be one of the most frustrating processes, if you do get onto a good sport rehabilitation program then you can minimize the damage you experience and get back into the game as quickly as possible.
The general principles of R.I.C.E is important to remember for sport rehabilitation. This stands for rest, ice compression and elevation. All of these factors will work together in the beginning weeks of the program to help reduce the swelling and pain you experience from the injury and put you back on the road to recovery.
Once you've spent about a week using R.I.C.E., then you can likely move on and start doing some easy resistance exercises to work the body part that is injured and get the blood flowing again. It is important to remember here that you should never push yourself too hard as if you do, you will likely only wind up re-injured and then require more down time. If you are not quite at the point of applying resistance to the injury, then simply get it moving around, working on increasing your range of motion and potentially applying some body weight to it (if it happens to be a lower limb injury for instance).
If the injury keeps on persisting though, after about two weeks time of resting and using the R.I.C.E. principle, then it may be best to look into getting outside help from a physiotherapist or a specialist as you may have done slightly more damage than you thought. They will be better able to treat the deep tissues that you cannot get to and also make suggestions for good recovery exercises you can perform.
So if you become injured, don't get too upset. Stay calm and know that if you act in a responsible manner and take steps to take care of yourself, you can likely get back onto your usual training sessions relatively quickly.