It all depends opn what you mean by 'pull'. If the hamstring was just tight then a massage and heat would probably be the best option. However if fibres were torn the you have entered the phases of healing - so the use of ice would be best.
You obviously need to scar tissue to bridge any area of damage. If you massage or stretch too quickly you may damage this new scar tissue and therefore the injury may not heal. However if you leave it too long then you may not be able to mould the scar tissue to use effectively.