"apm=off" and "no=hlt" are boot parameters. There is a good guide on the grumpymole blog for editing boot parameters temporarily and permanently.
I highly suggest you try to keep your laptop cooler first, since setting these two options will likely make it possible for your CPU to melt, literally. You can try ensuring there is proper ventalation, using the ondemand CPU governor (see how to change default scaling governor back to ondemand), stop any overclocking that is set, invest in a $10.00 external fan to protect your $500.00 laptop, and/or clean out the dust from the fans (see any of the results on this searh).
I would only edit these boot parameters as a last resort, since the computer usually only shuts down due to heat when it gets dangerously hot.