Direct current
Direct current (DC) is the unidirectional flow of electric charge.  Direct current is produced by such sources as batteries, thermocouples, solar cells, and commutator-type electric machines of the dynamo type.  Direct current may flow in a conductor such as a wire, but can also be through semiconductors, insulators, or even through a vacuum as in electron or ion beams. In direct current, the electric charges flow in a constant direction, distinguishing it from alternating current (AC). A term formerly used for  direct current was Galvanic current.
Direct current may be obtained from an alternating current supply by use of a current-switching arrangement called a rectifier, which contains electronic elements (usually) or electromechanical elements (historically) that allow current to flow only in one direction. Direct current may be made into alternating current with an inverter or a motor-generator set.
The first commercial electric power transmission (developed by Thomas Edison in the late nineteenth century) used direct current.
Because of the advantage of alternating current over direct current in transforming and transmission, electric power distribution today is nearly all alternating current.  For applications requiring direct current, such as third rail power systems, alternating current is distributed to a substation, which utilizes a rectifier to convert the power to direct current. See War of Currents.
Direct current is used to charge batteries, and in nearly all electronic systems as the power supply. Very large quantities of direct-current power are used in production of aluminum and other electrochemical processes. Direct current is used for some railway propulsion, especially in urban areas. High voltage direct current is used to transmit large amounts of power from remote generation sites or to interconnect alternating current power grids.

# Various definitions
Within electrical engineering, the term DC is used to refer to power systems that use only one polarity of voltage or current, and to refer to the constant, zero-frequency, or slowly varying local mean value of a voltage or current.  For example, the voltage across a DC voltage source is constant as is the current through a DC current source.  The DC solution of an electric circuit is the solution where all voltages and currents are constant.  It can be shown that any stationary voltage or current waveform can be decomposed into a sum of a DC component and a zero-mean time-varying component; the DC component is defined to be the expected value, or the average value of the voltage or current over all time.
Although DC stands for "Direct Current", DC sometimes refers to "constant polarity." With this definition, DC voltages can vary in time, such as the raw output of a rectifier or the fluctuating voice signal on a telephone line.
Some forms of DC (such as that produced by a voltage regulator) have almost no variations in voltage, but may still have variations in output power and current.

# Applications
Direct-current installations usually have different types of sockets, switches, and fixtures, mostly due to the low voltages used, from those suitable for alternating current. It is usually important with a direct-current appliance not to reverse polarity unless the device has a diode bridge to correct for this (most battery-powered devices do not).
DC is commonly found in many low-voltage applications, especially where these are powered by batteries, which can produce only DC, or solar power systems, since solar cells can produce only DC.  Most automotive applications use DC, although the alternator is an AC device which uses a rectifier to produce DC.  Most electronic circuits require a DC power supply.  Applications using fuel cells (mixing hydrogen and oxygen together with a catalyst to produce electricity and water as byproducts) also produce only DC.
Many telephones connect to a twisted pair of wires, and internally separate the AC component of the voltage between the two wires (the audio signal) from the DC component of the voltage between the two wires (used to power the phone).
Telephone exchange communication equipment, such as DSLAM, uses standard -48V DC power supply. The negative polarity is achieved by grounding the positive terminal of power supply system and the battery bank. This is done to prevent electrolysis depositions.
An electrified third rail can be used to power both underground (subway) and overground trains.