[Alternating current (green curve). The horizontal axis measures time; the vertical, current or voltage.](By Zureks - Own work, Public Domain, Link)
Reasoning on the topic of direct and alternating current. This division is conditional, and has nothing to do with electricity. This is a household definition. Electricity has one nature and is naturally manifested always the same. Constant and alternating current, these are adjectives and do not have a definition. They simply describe the properties that seem to a person.
The nature of the current is one. Both direct and alternating current are one and the same event, but direct current is a special case. We'll start with it.
The electric current in the circuit arises as a result of the potential difference and the closure of the circuit. The first is to close the circuit. In the chain, a current begins to flow. Movement, as we defined earlier from greater potential to less. The speed of movement starts from zero and gradually increases until a certain state is detected, the resistance of the circuit is determined. As a result, the voltage (potential difference) falls (decreases) - this is natural, but the current increases. At the moment of circuit closure, the current is zero. Gradually, the current grows, which is natural and becomes permanent, if there is a constant resistance in the circuit. Then the process does not change.
As a result, we have two phases. The current buildup, at the moment of switching on, and the DC current, when the system entered saturation mode, provided that the potential difference is kept constant and the resistance is constant. At the moment of opening the circuit, there is no voltage and the current drops to zero, almost instantaneously. Everything turns out three phases, two short and medium long.
The AC voltage is the same constant, it also has three phases, current rise, DC and current drop. The difference is that the middle phase of a direct current is practically absent, in time it tends to zero, but the two phases of the rise and fall of the current are uniform. This is not the end of the process. He starts to repeat again, but vice versa. Now the current builds up in the opposite direction. This is determined by the technical features of the generator. So, as the generator constantly rotates in a circle, such changes of forward and reverse current are repeated according to the frequency of rotation of the generator.
It should be borne in mind that the processes proceed very quickly by human standards, but not instantaneously. It takes time to establish.
[A schematic representation of long distance electric power transmission. C=consumers, D=step down transformer, G=generator, I=current in the wires, Pe=power reaching the end of the transmission line, Pt=power entering the transmission line, Pw=power lost in the transmission line, R=total resistance in the wires, V=voltage at the beginning of the transmission line, U=step up transformer.](By Roy McCammon - Own work, CC0, Link)
Output, alternating voltage, is a direct voltage that is constantly repeated.
Why is an alternating voltage needed? In order to constantly have a phase of increasing or decreasing current. Only in this case it is possible to transplant electrical properties at a distance and onto elements not connected by the same chain.
NB! A few words to the picture at the beginning of the post. The fact is that the picture shows a picture of the steady-state process, and the initial stage is absent for a dirict voltage.