As the engine turns, the alternator is generating electricity (magnets on copper wires). The electricity generated is powerful (over-powerful) and needs to be regulated by a regulator / justifier. Once corrected the electricity can flow to the component system or the storage system depending on what is needed.
Of course a parked bike has no moving fly wheel (electrical generator) and needs the battery to power-up the ignition. After the bike starts moving the junction switch will let the alternator directly power the components (extra current is stored in the battery). If a lot of electricity is needed the battery is asked to provide this.
A motorcycle has a small fuse system which avoids components being damaged by a faulty electrical system. The fuses blow instead of the component. Different bikes use different fuses, so check what you need (have a few spares around).
Motorcycle Electric System Tips
Motorcycle electric system is split in three different areas: the system which generates the electricity, the system which stores the power, the system which directs all the components.
Adjusting timing on the ignition is best left to the dealer (and these days it isn't even regular maintenance anymore)
Install sparkplugs with a slightly warm engine, clean around the plug and then pull it out. Insert new plugs smoothly and not too tight.
When reinserting a new sparkplug apply some copper grease to help it out the next time.
Generally speaking, electrical systems don't need much attention - it's the battery that most often needs the maintenance.
Remember when adding electrical components (extra lights, GPS, radio) that you need to stay under the total supplied by the charging system, otherwise you end up with problems.
Finding problems in an electrical system is hard, it's nearly impossible without a good electrical system diagram. (check your manual for one)
Always remember your electrical circuits need to make full loops. Any damage, breaks or a wrong hookup and electricity will not (can not) flow.
Using a test lamp (you know - one of those small lamps in a screwdriver) is one of the easiest and most effective ways to check your basic electrics (don't use it for the high-tech components like onboard pc).
Electrical problems fall into three categories short, bad ground or a broken component.
Solving a common electric problem - a blown fuse because of a short circuit through a component, switch, wire e.g. - trace the fuse circuit to help you find the problem.
Solving a common electric problem - a blown bulb because of wrong usage (touching the glass), old age, vibration or too much voltage.
Solving a common electric problem - a slow irregular indicator because of too much resistance in the electricity flow - check the circuits and components.
Solving a common electric problem - weak lights (which get stronger as you power the engine) because of bad grounding between light and frame
Alternator and Magneto
Alternators are rotating electrical machines used for generating electric power to charge the battery when the rotator of the alternator is turning at a sufficient speed. The basic function of an alternator is to generate the AC current.
The stator generates a magnetic field, which interacts with windings on the poles of the other structure. As the magnetic field intercepts the windings, an electrical current is generated, which is provided to a suitable load.
Permanent magnet alternators, which include magneto alternators, have permanent magnets assembled on the inner walls of a rotor, for example, formed as a flywheel. Permanent magnet alternator systems are used on motorcycles. The voltage regulators used with such systems typically use open loop control instead of the more common closed loop control systems used on automobile systems.
Early motorcycles and common dirt bikes that do not require a battery use a simple magneto rather than a full alternator. A motorcycle with a magneto requires no battery and come in two types, the Points type and the Electronic type. They require an adjustment process which can be difficult.