I doubt that you have permanently damaged your muscle, but in order to help it heal, rest it, use a heating pack for 20 minutes up to 3 times daily (will increase circulation to the muscle) and make sure that you drink plenty of water after working out.
As far as what could have caused the pain in the muscle, it is helpful to know that there is actually some muscle "damage" done each time you work out, especially if working out intensely.
In your case, because you are saying that you have noticed this occasionally after working out, especially when going especially hard, it would be important for you to not only make sure that you are stretching before working out, in order to let all your muscle warm up; but also you should be sure to drink plenty of fluids, water would be the best, XXXXX XXXXX occasional electrolyte drink is okay, after working out. It is particularly important to drink plenty of fluids after working out intensely in order to prevent a rare condition (or a milder version) of a problem called rhabdomyolysis. Usually after using the muscles intensly, the damaged muscle cells are taken up by the circulatory system. If you are not drinking enough fluid, then they either do not get disposed of via the circulatory system, and may contribute to "aches & pains" or in severe cases can go to the kidney in too large of a number for the kidney to filter, and can cause kidney damage. This is more likely to occur if one is dehydrated, so there are more cases during the warm seasons.
Edited by Susan Ivy on 3/26/2010 at 4:49 PM EST