A misfire can be caused by engine mechanical issues due to low compression, it can be a fuel issue (bad fuel injector or vacuum leak) or it could be ignition related (spark plug, ignition coil or plug wire were applicable).P0300 is a general misfire code affecting one or more cylinders P0301 through P0304 identifies which particular cylinder is misfiring but tests need to be done to see where exactly the problem is.
A "lean running" misfire condition can cause an engine to run hotter. And an engine that is running poorly because of a misfire can run hotter.