Electricity types
There are two types of electricity – alternating current (AC) and direct current (DC). These two terms describe the way in which the current flows in a circuit. In a DC circuit, the current only flows in one direction, meaning that they have a constant positive (+) and negative (-). This relationship of positive to negative charge is referred to as polarity. In an alternating current circuit, current flow changes direction regularly, switching the polarity (positive (+) and negative (-)) each time. This back and forth switching of polarity in an alternating current circuit is reffered to as frequency and is measured in Hertz (Hz).
In any electrical system, whether AC or DC, all components or appliances must be rated to function with the characteristics of the electrical system - voltage, current, and frequency if AC. If they are used improperly it can lead to a failure that results in fire or injury.
Direct current
PV modules can only produce DC, thus all PV systems have at least one DC circuit. Anything that uses a battery, including PV systems, will be based on DC as batteries can only store energy in DC form. Powering a load directly from DC saves the step of having to use an inverter to convert from DC to AC, which can create losses of more than 10% in the process. Many small scall systems are DC only and work well for lightning and the charging of small electronic devices like cell phones.
Alternating current
The grid is almost entirely built to function with alternating current, although the voltage, frequency and number of wires varies around the world. Nearly all electronic devices - cell phones, radios, computers and televisions - run on DC internally, but beacuse they are typically designed to function with the grid they incorporate electronics to convert from AC to DC. Appliances with motors or compressors - refrigerators, fans and tools - have motors that can run directly on alternating current.
AC or DC?
If so many appliances internally function on DC, why not just use direct current for every circuit then? Each one has different characterstics that make it useful for certain applications. AC has important properties that make it useful in the electrical grid. It is cheaper to transmit AC over long distances as it is easier to change between high and low voltages. High voltages are ideal for long distance transmission as they require less current, which means you can use smaller wires.