in AC isnt resistance a good thing since the flow of electricity changes direction?
In electricity, resistance generally refers to the thickness of the wire. The thicker it is, more current can flow through, or the less resistance there is to the current.
In an electric generator, a magnet spins inside a big cylinder packed with coils of wire and alternates between attracting and repelling the current, hence the name Alternating Current (AC)
A battery is an example of of Direct Current where the flow of electricity goes from one end, through a wire, to the other end.
Electricity is generated by agitating the electrons in a conductor, doing this also creates magnetism.