My engine for some reason revs real high at times and temp goes up what is this? on 2008 Ford F-350 Super Duty

It doesn't rev all the time just in spurts when I push on gas to move. The temp gauge I have noticed heats up when this happens or when just at idle.

Asked by for the 2008 Ford F-350 Super Duty
trans fluid can be to hot ck cooling fan operation or coolant level