What is an ICSP pin? I have read that it is an AVR and a tiny programming header for the Arduino, but what is an AVR and what does an ICSP pin do?
ICSP stands for In Circuit Serial Programming, which represents one of the several methods available for programming Arduino boards. Ordinarily, an Arduino bootloader program is used to program an Arduino board, but if the bootloader is missing or damaged, ICSP can be used instead. ICSP can be used to restore a missing or damaged bootloader.
A typical Arduino ICSP header has six pins, arranged 2x3. The article Connecting the Programmer: In-Circuit Serial Programming (ICSP) at Sparkfun describes some of the functions of ICSP pins, which include MISO, MOSI, SCK, V+, Ground, and Reset.
Each ICSP pin usually is cross-connected to another Arduino pin with the same name or function. For example, MISO on an Uno or Nano's ICSP header is connected to MISO / digital pin 12; MOSI on the ISCP header is connected to MOSI / digital pin 11; and so forth. Note, MISO, MOSI, and SCK pins taken together make up most of an SPI interface.
Several Arduinos, including the Uno, have two ICSP headers. One of them is for use with the ATmega328 (or similar), and the other for use with the ATmega16U2 (or similar) chip that implements USB. When present, this allows reprogramming the USB chip.
AVR refers to the instruction set architecture used in a family of Atmel microcontrollers. Several Arduinos – Mega, Uno, Nano, Micro – use AVR chips. Others, like the Zero and Due, instead use ATSAM3 chips, with an ARM instruction set architecture.