What is the cable connected to a plane 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.
  Source: Wikipedia


Related Questions:

Can large airliners be operated without ground support?

How are turbine engines started?