Temperature Sensor - Arduino Noob

you must know the expected temperature range to be able to select a sensor.

wrt CPU and GPU consider one that can be connect using heat conducting glue/paste.