Replacing the thermocouple

Does anyone know how to find and replace the thermocouple in a dryer. Where is it generally located in the machine and what is it connected to?