IR thermometers measure the average surface temperature of a certain size area. The area is determined by the resolution of the sensor and is related to how far away you hold it. Cheep thermometers have a low distance:spot ratio (1:1) so at 1" away it measures a 1" spot. Mid-price ones are up to about 12:1 so at 12" away it measures a 1" spot.
You just point it at the surface you want to measure. For the basking spot I take a measurement from farther away for an average then up close I take a bunch to make sure there are no hotspots.
For the cool side air temp is close to surface temp so you an just take a few readings. I also have aite digital thermometer for the cool side.