How to make a heat distortion effect?
Simulation

Unfortunately since it's not yet possible to vary the IOR inside an object, it can't be simulated completely.

However, you can at least use a smoke simulation to distort things based on simulated airflow.


Create a fire simulation where the hot air should be. It doesn't have to be very high resolution:


Move the domain to an empty layer (e.g. layer 2), then setup a material for it with some random noise:



This will result in something like this, which we can use to distort the rest of the scene:


Create a new renderlayer and set it to mask the layer the main scene. Also set the main scene renderlayer to exclude the smoke:

 

Note that I set the number of samples taken for the smoke render layer to 1, and disabled the main passes (using only the emission pass). 
Then setup the composite nodes:




Result: