My car RPM goes from o to 3000 rpms without me touching the gas then its starts on 1995 Honda Accord

to over heat so much that I cant drive it . What causes this type of problemk I already replaced the thermostat and I dont have any vislble leaks . Thanks for your help

2 answers
possibly head gasket
Find the cause of the fast idle first. Check for vacuum leaks and throttle cable binding/off track.