Arduino Uno rev 3 - what are the additional 2x3 set of pins for?
The ICSP pins have two functions:


For programming the ATMega328P directly using a hardware programmer (In Circuit Serial Programmimg)
SPI connections for shields in a standard place.


They are used for SPI because different boards have the SPI pins on the main headers in different locations. All boards should have this 6-pin block in the same place though meaning that shields can then work with more boards.

On the Uno they share the same physical connections as digital pins 11-13 plus reset and power.

JP2 and the other 6-pin block are connected to the USB interface chip (ATMega16U2). The 6 pin block provide ICSP for programming that chip. The other 4 (unpopulated) pins connect to GPIO pins on that same chip. They can be used for anything you like if you replace the firmware on the USB chip.

For now ignore those two pin groups. They aren't really anything to do with the Arduino side of things, only the USB interface.

You can find all this on the official Uno schematic which is on the official Uno product page: https://www.arduino.cc/en/Main/ArduinoBoardUno