Question: On old computers (using BIOS) we had to create 2 partitions, one to mount `/` and second for swap.  

But on new systems with UEFI we need to create third partition `EFI System` in addition to those two partitions. What is the purpose of this partition?

Update: does this partition is shared between a Linux distribution and Windows?

Answer: 
Beside the meaning of the [ESP](http://en.wikipedia.org/wiki/EFI_System_partition)(EFI System Partition), is really just any partition formatted with one of the UEFI spec-defined variants of FAT and given a specific GPT partition type to help the firmware find it. This way, all EFI executables will be stored at one place, and "chainload" the Operating System specific loader or other EFI executables

The steps of booting with this setup are:

1. System on - POST(Power On Self Test)
2. UEFI loads it's firmwares, and initializes all hardware required for booting.
3. Firmware determine what is the partition to be read, and where the UEFI applications are stored
4. Firmware reads Boot Manager data to decide based on a list what EFI application have the highest priority to boot. Some UEFI systems are less flexible, and expect only one UEFI application that needs to be stored at `<ESP>/EFI/BOOT/BOOTX64.EFI`.
5. UEFI application is launched. It may launch/chain another UEFI application(like an UEFI shell/menu) or load the initramfs and the kernel.

Basically, it's a FAT partition where you store EFI applications. The advantage here is that you don't need a "boot sector" anymore. It is a partition where you store binaries(efi files) and do whatever you want(depends on how your motherboard implements the specification).

**Update answer:** This partition will be shared in a way that a Linux related EFI(Gummiboot, rEFInd or Grub) and the Windows 8 standard EFI loader (`\EFI\Microsoft\Boot\bootmgfw.efi`) will be stored on the same partition. Is up to you if you want to create menus directly on the EFI Firmware or using Grub to create entries to Windows and Linux. [Example](https://wiki.archlinux.org/index.php/GRUB#Automatically_generating_using_.2Fetc.2Fgrub.d.2F40_custom_and_grub-mkconfig).

Unfortunately, Windows 7 32bit, and Windows Vista and older(no matter 32 or 64 bits) do not support EFI+GPT. You will have to use Bios + MBR solutions to dual boot.

**Further Reading:**

* [How UEFI works](https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/).
Via [Wikipedia](http://en.wikipedia.org/wiki/EFI_System_partition):

> 
> ESP (EFI System Partition) contains the boot loader programs for all
>  installed operating systems (which are contained in other partitions
>  on the same or other storage device), device driver files for devices
>  present in a computer that are used by the firmware at boot time,
>  system utility programs that are intended to be run before an
>  operating system is booted, and data files such as error logs.
> 
> 
> 

Further, relating it to BIOS-mode booting:

> 
> UEFI provides backward compatibility with legacy systems by reserving
>  the first block (sector) of the partition for compatibility code,
>  effectively creating a legacy boot sector. On legacy BIOS-based
>  systems, the first sector of a partition is loaded into memory and
>  execution is transferred to this code. UEFI firmwares do not execute
>  the code in the Master Boot Record (MBR), except when booting in
>  legacy BIOS mode through the Compatibility Support Module (CSM).
> 
> 
>