higherinthesky:
My first message in the Arduino community.
Then a small tip, reread your post (and especially the title) before posting ![]()
The image:

And to answer, on the right a pin provides a voltage (when on) aka connects it to the positive of the supply which causes a current flow through the led and resistor to GND.
On the left, the sensor is just a device which needs power to work hence it has a GND and 5V connection. And it just outputs a voltage depending on the temperature.