For very recent injuries (twisted ankle, wrist pain, wrenched back, etc...) follow these recommendations:
1. Stop the activity that is causing the pain
2. Have the injury assessed as quickly as possible by a health professional
3. Follow the R.I.C.E. principle, as described in the next section
4. Practice remedial stretching and strengthening exercises as prescribed by your health professional or physical trainer
More: The R.I.C.E. principle Physical screening Injury prevention