There is a lot of information out there. It is hard to get good information. Here is a survey of techniques.
When you experience pain in fingers, it is bit too late. So you need to stop climbing or anything to aggravate.
First off, rest is the key to prevent hand injuries. Adequate rest is the key to climbing improvements as your body repairs and gets stronger.
It seems first 48 hours is the key to a fast recovery. Ice for 20 minutes several times. Pain results from inflamation. There are lots of little parts to your hands; pulley, tendon, bone, ligament. To get specific information, it is best to see a doctor. You need to take Iboprofen (anti-inflamatory) during this time. Also, use elastic wrap around your fingers to keep swelling down. It seems there are three categories of severity; type 1, 2 and 3. Not withstanding the most severe type, it would take a week or two.
The consensus is that you want to stretch as soon as pain is not there. This is to get the full range of motion back. This is the second key thing. Stretch each finger and each joint. Massage each part. It is a lot like kneading bread. Go through each part and check for anything like bump.
Once they are injured, soft tissues will take much longer to repair as blood supply to them is limited. Here are two methods; freeze and hot-and-cold.
Freeze method is to keep your hand (or fingers) in a bucket of ice and water. It needs to be freezing point. Your hand will cool off to severe pain and it will warm up. Keep hot tea and wear warm clothing. What happens next is magic. Your body kicks in a flood of blood to your finger tips. You need to keep your hand in for 30 minutes. No, your hand will not freeze or get damaged. It is pretty amazing. In my case, I go through excruciating pain. You do this twice a day. It will help you a great deal.
Hot-and-cold is to keep a bowl of hot water and a bowl of cold water. Always finish with cold. But keep your fingers in each for 20 seconds and alternate. This does the same thing but to lesser degree than the freeze method.
Once you feel strong and free of pain and with full range of motion, it is time to strengthen them. You can knead putty and use it as a band to flex fingers.
Working with Chinese medicine balls seems to help some climbers.
http://www.davemacleod.com/articles/climbinginjuries.html freeze method