There are two basic types of electrical current: direct current, or DC, and alternating current, or AC. In a direct current system, the electrons flow through a conductor in only one direction.
In the example above, the electrons leave the battery and flow through a wire to a light bulb. After they flow through the bulb, the electrons flow back to the battery in a continuous loop. As you can see, the electrons are flowing in one direction only. DC electricity can be produced by a number of different devices. These include batteries, solar photovoltaic cells, and DC generators such as those used in wind turbines and other small renewables projects. Using DC generators can be problematic since almost all of the electrical grid operates on alternating current. When used in the grid, DC power must be converted to AC using a device called an inverter. While the grid almost exclusively uses AC power, many electronic devices such as computers and mobile phones require DC power. Thus, your device charger includes a rectifier that converts the grid power to DC.
While DC electricity can be produced from a large variety of sources and has some advantages due to its simplicity, it also has several economic disadvantages for widespread use in the electric delivery system when compared to AC electricity. Chief among these are higher line losses under most conditions, the inability to use transformers to raise or lower voltage, and higher capital costs associated with the larger wires that would be required to economically deliver DC power to customers. However, under certain conditions high-voltage DC transmission lines, or HVDC, can be beneficial and are used to move large amounts of power over long distances.