If you've torn the muscles you need to rest and theres little else you can do. I did something similar about a year ago, I was trying to look good and a personal trainer dared me to lift weights and do squats. The weights were way to heavy for me (like 3 times what I'd normally lift) I managed just 3 sets of 15 before I gave out and got pain immediatly as I walked away. It lasted for 2-3 weeks following. I was not able to walk down stairs for the first week without tears (no joke!). I had to cut certain exercises out for that time. I worried I was going to lose my fitness and stregnth as I was unable to do what I normally did for so long! I didn't even notice an improvement in my physique when the pain had gone- it was a waste of effort. Exercise works when you do it over and over again over days and weeks and months, not a one off- don't injure yourself by going too far, your only wasteing your own time and energy.
I learned my lesson: don't try to do more then you think is wise, no more then you'd ask from your best mate.
I would recommend the following:
Ice baths or cold showers after exercise or if you have had a long day. This is supposed to aid repair but done properly can feel worse then any exercise itself! It KILLS!!
Resting/sleeping well. Your body does alot of repair work when you sleep, mainly as its when you are still but also as certain hormones come into action. Make sure your getting enough sleep every night even if it means early nights for a few weeks.
Keeping hydrated. Dehydration = body not functioning properly and repair taking longer.
Eat well, similar to the above, too many toxins and your body is too busy trying to deal with them and not processing the repair. Also you need to keep the nutrients up. Protein in theory should help but I have no evidence either way, its just common sense though. Clean food and a happier body in my experience.
I would say don't spend whole days inactive. Back off from any heavy resistance but things like walking, cycling, cardio things to keep up the circulation and blood flow. Its the blood flowing through the muscles that will help. Don't do anything that leads to pain obviously but most forms of exercise will kill for the first few minutes, it fades after then but be careful to 'listen' for any new pains as pain is generally a warning sign. New pains and stop but warming up and then feeling a reduction in the pain is fine.
Stretching helps. Just remember to use good form. Eg with a quad stretch, both knees pointed down to towards the floor, inner thighs touching, keep into buttocks, hold for 30 seconds to 2 mins. There are many different quad and thigh stretches you can do in addition. Just remember your posture as bad posture can render a stretch useless. If you have one, a foam roller would also be an idea.
Which leads to the next thing: massage. If its too painful to bear don't do anything but if yu can, try an ice pack, massaging over sore spots in an upwards/circular direction. If you can afford one, a proper sports massage would be something to look into once the bulk of the pain has subsided.