The resting part is easy: Take a load off. Stay off your injured leg or avoid using your tweaked arm. Whatever the injury, give it a rest for a couple of days.
Ice your injury to help keep the pain and swelling down. Whether you're using a homemade ice pack or a chemical cold pack, be careful not to put it directly on the skin or leave the ice on too long. You could get frostbite from the icepack. Every couple of hours put ice on the injury for 10 minutes, take it off for 10 minutes and put it back on for 10 more. You could also put ice on for 20 minutes straight and call it good, but in at least one study 10 minutes on followed by 10 minutes off helped reduce pain in ankle injuries.
Compression is done by wrapping an elastic bandage around the injured extremity. Not too tight, but not too loosely. You should be able to easily slip a couple of fingers under the wrap when it's done.
Elevation is pretty simple: Prop it up. Keep your injured extremity higher than your heart for maximum effect. Indeed, when we're talking about legs, this is much easier to do when you lie down and rest -- see how it all fits together?
Don't Over Do It
Use RICE for 24 to 48 hours after a minor injury. If after 3 days you aren't starting to feel better, it's time to see the doctor.
You can also use RICE while an injury is healing if you aggravate it. Don't use RICE too long, however, because good blood flow to your injury is essential for healing. Like many things, RICE is good in moderation.
Bleakley, C.M., S.M. McDonough and D.C. MacAuley. "Cryotherapy for acute ankle sprains: a randomised controlled study of two different icing protocols." Br J Sports Med. 2006 August; 40(8): 700:705