Understanding and tuning thermal transport at the nanoscale