A coil of wire has some special properties. The biggest one is its inductance (specifically its self-inductance); a coil tends to have a much higher self-inductance than a straight wire because the magnetic field from the charge flowing in one part of the coil will cross through the other wires in the coil.
As a result, coils are often used as transducers to convert mechanical energy to electrical energy (e.g. as an electrical generator) or to convert electrical energy to mechanical energy (e.g. as a speaker).
A coil can also be referred to as a solenoid, in which case the emphasis is on the magnetic field created around the coil when there are charges flowing through it.