What you need to do first is shut off water supply to water heater then drain the tank and replace what is called temp/pressure relief valve usually they get dirty and can't sense proper temp and cause the valve to blow.You should use Teflon tape or pipe sealant on the threads of the new one and screw back on . Open cold feed valve and refill tank.