I've seen that airplanes are connected to some wire like in the picture. What is it's name and what is it for?
This is a ground power unit (GPU) which supplies the aircraft with electricity while the generators or the auxiliary power unit (APU) are not running. This is important especially during boarding, when the cabin lighting needs to remain on for passengers to embark or disembark. The GPU is also used to start the APU, which in turn provides electricity to start the engines and the generators.
A ground power unit (GPU) is a vehicle capable of supplying power to aircraft parked on the ground. Ground power units may also be built into the jetway, making it even easier to supply electrical power to aircraft. Many aircraft require 28 V of direct current and 115 V 400 Hz of alternating current. The electric energy is carried from a generator to a connection on the aircraft via 3 phase 4-wire insulated cable capable of handling 261 amps (90 kVA). These connectors are standard for all aircraft, as defined in ISO 6858.
It provides power to the plane for when the engines and APU are not running while sitting at the gate to save fuel.
It allows the cabin lights to remain on so the passengers aren't tripping over each other as they board.
The power may also be used to start the APU that will in turn provide the power needed to start the main engines.
There are two kinds of GPUs:
The cables are connected by groundcrew before the pilot shuts down all engines. It is different from pilot to pilot. The APU remains on while the aircraft is being serviced.
It is ground power unit. Due to the technical difficulty on ground to operate APU, which is the source of power for the aircraft. Aircraft engineers connect GPU.