I am very confused, when I searched how thermometers work it is said that when it gets hot it will go up and vice versa when cold. But on other resources it said thatwhen you stick a thermometer in a piece of meat, or in water you will get the temperature of it and there are sensors that makes the thermometer go as the same temperature as the object we are measuring and as a result they are showing us the obther object measurement/amount of heat/cold. Which one is it?
The mercury in the liquid thermometer has a specific volume for a specific temperature. When you stick it to an object first the mercury exchanges heat with the object until it is at thermal equilibrium. When it has attained the same temperature as the body, the volume that it has attained gives the measure of the temperature (The scales are so calibrated).
Note that as mentioned in the other answer there may be more kinds of thermometers.
You're talking about 2 types of thermometer here,
There's the liquid thermometer, where a liquid (often mercury or a red dyed alcohol) will be in a very thin orifice with a large bulb of the liquid at the bottom. Depending on the temperature you put the bulb in, the density changes to reach thermal equilibrium and the orifice is calibrated to correspond to temperatures.
A digital thermometer (the metal ones you check meat temperatures with and such) usually use a thermistor. The temperature it reads on the end will change the resistance; which the digital components change to a temperature.