One can take it this way that Rheostat sets you the status of Resistance where Thermostat tells you the status of resistance. Rheostat is a variable resistance device where one can increase or decrease the resistance as he wants to do.
Coming to Thermostat : The physics behind is - If tempareture of a material increased so as its resistance. Now resistance we can measure easily with a simple analog or digital meters and or multimeters. Now if you know the certain resistance value of a thermostat at a given tempareture, then during hot or cold the hike or drop of resistance will tell you the status of tempareture.
All we need to have a tempareture-resistance characteristics of the material we are using in a thermostat, and before use it calibrate once and scale it properly for better results with next to zero error.