Direct current flows steadily in one direction, like water in a pipe: batteries, solar panels and electronics all live on DC. Alternating current reverses direction many times a second, 50 or 60 times depending on the country, its voltage tracing a sine wave. For the first decades of electric power the two fought openly, Edison championing DC and Tesla and Westinghouse AC. AC won the grid for one decisive reason: the transformer. A transformer needs a changing current to work, and with it AC voltage can be stepped up for transmission, slashing current and with it the losses in the lines, then stepped down for safe use. Edison era DC could not change voltage efficiently, so its power stations had to sit within a mile or so of their customers.
The grid still runs on AC, and large motors prefer it: the three phase induction motor is cheap, rugged and brushless because AC creates its rotating field for free. Inside devices, the picture reverses. Every chip, LED and battery runs on DC, so modern equipment is full of conversion: the charger and power supply industry exists to turn wall AC into device DC. DC motors survive where simple speed control by voltage matters, in toys, tools and vehicle auxiliaries, though brushless designs, electronically commutated and fed from DC, have taken much of that territory. Solar generation produces DC, batteries store DC, and electric vehicles are DC machines at heart with an inverter making variable frequency AC for their motors.
High voltage DC transmission has carved out the long distance and undersea niches where AC struggles: beyond about 50 km under water, AC cable capacitance eats the capacity, while DC flows cleanly, and links between unsynchronised grids must be DC to work at all. Modern power electronics made conversion efficient at any scale, so the old boundary dissolves: data centres debate DC distribution to cut conversion steps, and USB delivers negotiated DC power that runs laptops. The honest summary is that AC won the twentieth century on the strength of one device, the transformer, and DC is winning the twenty first device by device, on the strength of another, the transistor. An engineer today must be bilingual, and the conversion losses between the two worlds are a real line in every modern power budget.