寒い (samui) means “cold.” You can use this when talking about the weather outside or the temperature of a room.
冷たい (tsumetai) is closer to “cold to the touch.” So you would use 冷たい when talking about something like an ice cube.