First and most important - don't stretch it to the point of pain! You're just doing more damage. With mild stretching on a regular basis it will loosen. Run as long as it doesn't hurt during or after your run. I always debate about ice or heat. Others may have better advice. I would suggest ice if there is swelling, and after your run. Heat will help loosen it if there is no swelling.
If you've been doing speedwork on a track oval or racing the typical counter-clockwise course, your right hamstring will be compromised. Gently start trigger-pointing that entire muscle (usually the powerful biceps femoris - the outside portion of the 3 hamstrings) to rub out the tight areas before you attempt the stretch. Save your stretches for the latter part of rehab, as Len suggests.
The main trigger point area for the B Femoris is in the longitudinal center as it crosses the femur bone, even though you may feel the pain at the origin (ischial tuberosity where it attaches to the pelvis). Don't press too hard against the bone or you will weaken the muscle.
Meanwhile, running clockwise loops will give the right hams a break while increasing circulation as you heal.